chore: make fish files executable

This commit is contained in:
2025-10-23 23:44:05 +03:00
parent 0bd72c6d51
commit 3f2d1b85ed
18 changed files with 299 additions and 320 deletions

View File

@@ -3,7 +3,7 @@
function __docker_debug
set -l file "$BASH_COMP_DEBUG_FILE"
if test -n "$file"
echo "$argv" >> $file
echo "$argv" >>$file
end
end
@@ -108,7 +108,6 @@ function __docker_requires_order_preservation
return 1
end
# This function does two things:
# - Obtain the completions and store them in the global __docker_comp_results
# - Return false if file completion should be performed
@@ -215,18 +214,18 @@ end
# so we can properly delete any completions provided by another script.
# Only do this if the program can be found, or else fish may print some errors; besides,
# the existing completions will only be loaded if the program can be found.
if type -q "docker"
if type -q docker
# The space after the program name is essential to trigger completion for the program
# and not completion of the program name itself.
# Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
complete --do-complete "docker " > /dev/null 2>&1
complete --do-complete "docker " >/dev/null 2>&1
end
# Remove any pre-existing completions for the program since we will be handling all of them.
complete -c docker -e
# this will get called after the two calls below and clear the $__docker_perform_completion_once_result global
complete -c docker -n '__docker_clear_perform_completion_once_result'
complete -c docker -n __docker_clear_perform_completion_once_result
# The call to __docker_prepare_completions will setup __docker_comp_results
# which provides the program's completion choices.
# If this doesn't require order preservation, we don't use the -k flag