13 lines
333 B
Fish
13 lines
333 B
Fish
function removepath
|
|
if test (count $argv) -lt 1
|
|
echo "Usage: removepath <path>"
|
|
return 1
|
|
end
|
|
if set -l index (contains -i $argv[1] $PATH)
|
|
set --erase --universal fish_user_paths[$index]
|
|
echo "Removed '$argv[1]' from PATH."
|
|
else
|
|
echo "'$argv[1]' not found in PATH."
|
|
end
|
|
end
|