mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
added path managing functions
This commit is contained in:
parent
58753e4ad5
commit
8e94f7181c
3 changed files with 15 additions and 0 deletions
5
.config/fish/functions/addpaths.fish
Normal file
5
.config/fish/functions/addpaths.fish
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
function addpaths
|
||||
contains -- $argv $fish_user_paths
|
||||
or set --universal fish_user_paths $fish_user_paths $argv
|
||||
echo "Updated PATH: $PATH"
|
||||
end
|
||||
8
.config/fish/functions/removepath.fish
Normal file
8
.config/fish/functions/removepath.fish
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function removepath
|
||||
if set -l index (contains -i $argv[1] $PATH)
|
||||
set --erase --universal fish_user_paths[$index]
|
||||
echo "Updated PATH: $PATH"
|
||||
else
|
||||
echo "$argv[1] not found in PATH: $PATH"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue