Run fish_indent on share/**.fish

This commit is contained in:
Johannes Altmanninger 2021-08-01 18:40:56 +02:00
parent 3a375c2399
commit 1b20e75f19
7 changed files with 26 additions and 28 deletions

View File

@ -9,7 +9,7 @@ end
set -l sysver (uname -sr | string match -r "(Darwin) (\d\d)"\.) set -l sysver (uname -sr | string match -r "(Darwin) (\d\d)"\.)
if test $status -eq 0 -a (count $sysver) -eq 3 if test $status -eq 0 -a (count $sysver) -eq 3
and test $sysver[2] = 'Darwin' -a $sysver[3] -ge 19 and test $sysver[2] = Darwin -a $sysver[3] -ge 19
set -l dir set -l dir
if test -n "$XDG_CACHE_HOME" if test -n "$XDG_CACHE_HOME"

View File

@ -1,10 +1,10 @@
function __fish_argcomplete_complete function __fish_argcomplete_complete
set -lx _ARGCOMPLETE 1 set -lx _ARGCOMPLETE 1
set -lx _ARGCOMPLETE_IFS \n set -lx _ARGCOMPLETE_IFS \n
set -lx _ARGCOMPLETE_SUPPRESS_SPACE 1 set -lx _ARGCOMPLETE_SUPPRESS_SPACE 1
set -lx _ARGCOMPLETE_SHELL fish set -lx _ARGCOMPLETE_SHELL fish
set -lx COMP_LINE (commandline -pc) set -lx COMP_LINE (commandline -pc)
set -lx COMP_POINT (string length (commandline -cp)) set -lx COMP_POINT (string length (commandline -cp))
set -lx COMP_TYPE set -lx COMP_TYPE
$argv 8>&1 9>&2 2>/dev/null $argv 8>&1 9>&2 2>/dev/null
end end

View File

@ -1,5 +1,3 @@
function __fish_is_token_n --description 'Test if current token is on Nth place' --argument-names n function __fish_is_token_n --description 'Test if current token is on Nth place' --argument-names n
fish_is_nth_token $n fish_is_nth_token $n
end end

View File

@ -8,7 +8,7 @@ function __fish_make_completion_signals --description 'Make list of kill signals
# Just hardcode the signals. # Just hardcode the signals.
set -l os (uname) set -l os (uname)
if string match -q 'CYGWIN*' -- $os if string match -q 'CYGWIN*' -- $os
or string match -iq 'Msys' -- $os or string match -iq Msys -- $os
set -a __kill_signals "1 HUP" "2 INT" "3 QUIT" "4 ILL" "5 TRAP" "6 ABRT" \ set -a __kill_signals "1 HUP" "2 INT" "3 QUIT" "4 ILL" "5 TRAP" "6 ABRT" \
"6 IOT" "7 BUS" "8 FPE" "9 KILL" "10 USR1" "11 SEGV" \ "6 IOT" "7 BUS" "8 FPE" "9 KILL" "10 USR1" "11 SEGV" \
"12 USR2" "13 PIPE" "14 ALRM" "15 TERM" "16 STKFLT" "17 CHLD" \ "12 USR2" "13 PIPE" "14 ALRM" "15 TERM" "16 STKFLT" "17 CHLD" \

View File

@ -61,18 +61,18 @@ else if type -q pkgfile
__fish_default_command_not_found_handler $argv[1] __fish_default_command_not_found_handler $argv[1]
end end
end end
# pacman is too slow, see #7841. # pacman is too slow, see #7841.
# else if type -q pacman # else if type -q pacman
# function fish_command_not_found # function fish_command_not_found
# set -l paths $argv[1] # set -l paths $argv[1]
# # If we've not been given an absolute path, try $PATH as the starting point, # # If we've not been given an absolute path, try $PATH as the starting point,
# # otherwise pacman will try *every path*, and e.g. bash-completion # # otherwise pacman will try *every path*, and e.g. bash-completion
# # isn't helpful. # # isn't helpful.
# string match -q '/*' -- $argv[1]; or set paths $PATH/$argv[1] # string match -q '/*' -- $argv[1]; or set paths $PATH/$argv[1]
# # Pacman only prints the path, so we still need to print the error. # # Pacman only prints the path, so we still need to print the error.
# __fish_default_command_not_found_handler $argv[1] # __fish_default_command_not_found_handler $argv[1]
# pacman -F $paths # pacman -F $paths
# end # end
else else
# Use standard fish command not found handler otherwise # Use standard fish command not found handler otherwise
function fish_command_not_found --on-event fish_command_not_found function fish_command_not_found --on-event fish_command_not_found

View File

@ -36,7 +36,7 @@ function fish_config --description "Launch fish's web based configuration"
echo No such subcommand: $cmd >&2 echo No such subcommand: $cmd >&2
return 1 return 1
end end
switch $cmd switch $cmd
case prompt case prompt
# prompt - for prompt switching # prompt - for prompt switching
@ -67,7 +67,7 @@ function fish_config --description "Launch fish's web based configuration"
if functions -q fish_right_prompt; if functions -q fish_right_prompt;
echo right prompt: (false; fish_right_prompt) echo right prompt: (false; fish_right_prompt)
end' $p end' $p
echo echo
end end
case list '' case list ''
string replace -r '.*/([^/]*).fish$' '$1' $prompt_dir/*.fish string replace -r '.*/([^/]*).fish$' '$1' $prompt_dir/*.fish
@ -248,7 +248,7 @@ function fish_config --description "Launch fish's web based configuration"
# permanently remove the globals. # permanently remove the globals.
set $scope $toks set $scope $toks
set have_color 1 set have_color 1
end < $file end <$file
# Return true if we changed at least one color # Return true if we changed at least one color
test $have_color -eq 1 test $have_color -eq 1

View File

@ -3,7 +3,7 @@ function prompt_login --description "Print a description of the user and host su
set -g __fish_machine set -g __fish_machine
set -l debian_chroot $debian_chroot set -l debian_chroot $debian_chroot
if test -r /etc/debian_chroot if test -r /etc/debian_chroot
set debian_chroot (cat /etc/debian_chroot) set debian_chroot (cat /etc/debian_chroot)
end end