mirror of
https://github.com/jorgebucaran/fisher
synced 2024-07-06 23:11:48 +02:00
Simplify plugin_is_prompt check.
This commit is contained in:
parent
b1f59fa699
commit
966d168dbc
20
fisher.fish
20
fisher.fish
|
@ -1351,20 +1351,10 @@ end
|
||||||
|
|
||||||
|
|
||||||
function __fisher_plugin_is_prompt -a path
|
function __fisher_plugin_is_prompt -a path
|
||||||
if test -e $path/fish_prompt.fish
|
for file in "$path"/{,functions/}{fish_prompt,fish_right_prompt}.fish
|
||||||
return
|
if test -e "$file"
|
||||||
end
|
return
|
||||||
|
end
|
||||||
if test -e $path/functions/fish_prompt.fish
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if test -e $path/fish_right_prompt.fish
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if test -e $path/functions/fish_right_prompt.fish
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
@ -1721,7 +1711,7 @@ function __fisher_get_file_age -a file
|
||||||
else if type -q python
|
else if type -q python
|
||||||
python -c "from __future__ import print_function; import os, time; print(int(time.time() - os.path.getmtime('$file')))" ^ /dev/null
|
python -c "from __future__ import print_function; import os, time; print(int(time.time() - os.path.getmtime('$file')))" ^ /dev/null
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function __fisher_usage
|
function __fisher_usage
|
||||||
|
|
Loading…
Reference in a new issue