mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
Format __fish_cache_sourced_completions
This commit is contained in:
parent
66aab66670
commit
d0cf07c4b3
1 changed files with 4 additions and 4 deletions
|
@ -24,17 +24,17 @@ function __fish_cache_sourced_completions
|
||||||
|
|
||||||
set -l cmtime 0
|
set -l cmtime 0
|
||||||
path is -rf -- $stampfile
|
path is -rf -- $stampfile
|
||||||
and read cmtime < $stampfile
|
and read cmtime <$stampfile
|
||||||
|
|
||||||
# If either the timestamp or the completion file don't exist,
|
# If either the timestamp or the completion file don't exist,
|
||||||
# or the mtime differs, we rerun.
|
# or the mtime differs, we rerun.
|
||||||
#
|
#
|
||||||
# That means we'll rerun if the command was up- or downgraded.
|
# That means we'll rerun if the command was up- or downgraded.
|
||||||
if path is -vrf -- $stampfile $compfile || test "$cmtime" -ne "$mtime" 2>/dev/null
|
if path is -vrf -- $stampfile $compfile || test "$cmtime" -ne "$mtime" 2>/dev/null
|
||||||
$argv > $compfile
|
$argv >$compfile
|
||||||
# If the command exited unsuccessfully, we assume it didn't work.
|
# If the command exited unsuccessfully, we assume it didn't work.
|
||||||
or return 2
|
or return 2
|
||||||
echo -- $mtime > $stampfile
|
echo -- $mtime >$stampfile
|
||||||
end
|
end
|
||||||
|
|
||||||
if path is -rf -- $compfile
|
if path is -rf -- $compfile
|
||||||
|
|
Loading…
Reference in a new issue