mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-02-21 07:13:38 +08:00
Fixed condition check on item existence in list
Previously, 'set $path...' ran regardless of the result of 'and not contains...'. This fixes _append_path to actually use the result of the condition check.
This commit is contained in:
parent
8e6adf2541
commit
239beda7ea
@ -7,7 +7,9 @@ function _append_path
|
||||
set path $argv[2]
|
||||
end
|
||||
|
||||
if test -d $argv[1]; and not contains $argv[1] $$path
|
||||
set $path $argv[1] $$path
|
||||
if test -d $argv[1]
|
||||
if not contains $argv[1] $$path
|
||||
set $path $argv[1] $$path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user