mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-12 22:03:53 +00:00
chore: make fish files executable
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
function __sesh_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 __sesh_requires_order_preservation
|
||||
return 1
|
||||
end
|
||||
|
||||
|
||||
# This function does two things:
|
||||
# - Obtain the completions and store them in the global __sesh_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 "sesh"
|
||||
if type -q sesh
|
||||
# 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 "sesh " > /dev/null 2>&1
|
||||
complete --do-complete "sesh " >/dev/null 2>&1
|
||||
end
|
||||
|
||||
# Remove any pre-existing completions for the program since we will be handling all of them.
|
||||
complete -c sesh -e
|
||||
|
||||
# this will get called after the two calls below and clear the $__sesh_perform_completion_once_result global
|
||||
complete -c sesh -n '__sesh_clear_perform_completion_once_result'
|
||||
complete -c sesh -n __sesh_clear_perform_completion_once_result
|
||||
# The call to __sesh_prepare_completions will setup __sesh_comp_results
|
||||
# which provides the program's completion choices.
|
||||
# If this doesn't require order preservation, we don't use the -k flag
|
||||
|
||||
Reference in New Issue
Block a user