mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
add(fish): use builtin function
read more: `https://github.com/fish-shell/fish-shell/issues/8604`
This commit is contained in:
parent
4aeaee18d2
commit
84bd7caa18
3 changed files with 5 additions and 18 deletions
|
|
@ -1,5 +0,0 @@
|
|||
function add_paths --description "add to PATH idempotently"
|
||||
contains -- $argv $fish_user_paths
|
||||
or set --universal fish_user_paths $fish_user_paths $argv
|
||||
echo "Updated PATH: $PATH"
|
||||
end
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
function remove_path
|
||||
if set 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