async validity check
This commit is contained in:
parent
d59b9b817f
commit
b557d635fd
1 changed files with 13 additions and 11 deletions
|
@ -159,18 +159,20 @@ def fish_completion():
|
||||||
dedent_strip_as_tuple(
|
dedent_strip_as_tuple(
|
||||||
f'''
|
f'''
|
||||||
function __borgmatic_check_version
|
function __borgmatic_check_version
|
||||||
set this_filename (status current-filename)
|
set -fx this_filename (status current-filename)
|
||||||
set this_script (cat $this_filename 2> /dev/null)
|
fish -c '
|
||||||
set installed_script (borgmatic --fish-completion 2> /dev/null)
|
set this_script (cat $this_filename 2> /dev/null)
|
||||||
if [ "$this_script" != "$installed_script" ] && [ "$installed_script" != "" ]
|
set installed_script (borgmatic --fish-completion 2> /dev/null)
|
||||||
echo "{upgrade_message(
|
if [ "$this_script" != "$installed_script" ] && [ "$installed_script" != "" ]
|
||||||
'fish',
|
echo "{upgrade_message(
|
||||||
'borgmatic --fish-completion | sudo tee $this_filename',
|
'fish',
|
||||||
'$this_filename',
|
'borgmatic --fish-completion | sudo tee $this_filename',
|
||||||
)}"
|
'$this_filename',
|
||||||
end
|
)}"
|
||||||
|
end
|
||||||
|
' &
|
||||||
end
|
end
|
||||||
__borgmatic_check_version &
|
__borgmatic_check_version
|
||||||
|
|
||||||
function __borgmatic_last_arg --description 'Check if any of the given arguments are the last on the command line'
|
function __borgmatic_last_arg --description 'Check if any of the given arguments are the last on the command line'
|
||||||
set -l all_args (commandline -poc)
|
set -l all_args (commandline -poc)
|
||||||
|
|
Loading…
Reference in a new issue