You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
294 B
Fish
14 lines
294 B
Fish
11 years ago
|
# Appends the path to the specified path list. If no list specified,
|
||
|
# defaults to $PATH
|
||
|
function _append_path
|
||
|
set -l path PATH
|
||
|
|
||
|
if test (echo $argv | wc -w) -eq 2
|
||
|
set path $argv[2]
|
||
|
end
|
||
|
|
||
|
if test -d $argv[1]; and not contains $argv[1] $$path
|
||
|
set $path $argv[1] $$path
|
||
|
end
|
||
|
end
|