reviewed merge reqest 14:

* fixed some whitespace inconsistencies
* changed variable handling in __fish_complete_subcommand_root
This commit is contained in:
Jan Kanis 2012-01-25 01:14:47 +01:00
parent 344b9bdba3
commit b0c6d891e9
3 changed files with 21 additions and 25 deletions

View file

@ -1,11 +1,11 @@
function __fish_complete_subcommand -d "Complete subcommand"
function __fish_complete_subcommand -d "Complete subcommand"
set -l skip_next 1
switch "$argv[1]"
case '--fcs-skip=*'
set -l rest
echo $argv[1] | tr = ' ' | read test skip_next
set -e argv[1]
end
switch "$argv[1]"
case '--fcs-skip=*'
set -l rest
echo $argv[1] | tr = ' ' | read test skip_next
set -e argv[1]
end
set -l res ""
set -l had_cmd 0
@ -14,7 +14,7 @@ function __fish_complete_subcommand -d "Complete subcommand"
for i in $cmd
if test $skip_next -gt 0
set skip_next (expr $skip_next - 1)
set skip_next (expr $skip_next - 1)
continue
end
@ -31,7 +31,7 @@ function __fish_complete_subcommand -d "Complete subcommand"
case '-*'
case '*=*'
case '*'
set had_cmd 1
set res $i
end

View file

@ -1,10 +1,6 @@
function __fish_complete_subcommand_root -d "Run the __fish_complete_subcommand function using a PATH containing /sbin and /usr/sbin"
set -l PATH_OLD $PATH
set PATH /sbin /usr/sbin $PATH
set -lx PATH /sbin /usr/sbin $PATH
__fish_complete_subcommand $argv
set PATH $PATH_OLD
end

View file

@ -7,15 +7,15 @@ function __fish_complete_tex -d "Common completions for all tex commands"
__fish_complete_suffix (commandline -ct) .tex '(La)TeX file'
)"
complete -c $argv -o file-line-error -d "Show errors in style file:line"
complete -c $argv -o no-file-line-error -d "Show errors not in style file:line"
complete -c $argv -o halt-on-error -d "Stop processing at the first error"
complete -c $argv -o interaction=batchmode -d "Set interation mode"
complete -c $argv -o interaction=nonstopmode -d "Set interation mode"
complete -c $argv -o interaction=scrollmode -d "Set interation mode"
complete -c $argv -o interaction=errorstopmode -d "Set interation mode"
complete -c $argv -o output-directory= -x -a "(__fish_complete_directories (commandline -ct))" -d "Output directory"
complete -c $argv -o shell-escape -d "Enable \write18{SHELL COMMAND}"
complete -c $argv -o no-shell-escape -d "Disable \write18{SHELL COMMAND}"
complete -c $argv -o src-specials -d "Insert source specials into the DVI file"
complete -c $argv -o file-line-error -d "Show errors in style file:line"
complete -c $argv -o no-file-line-error -d "Show errors not in style file:line"
complete -c $argv -o halt-on-error -d "Stop processing at the first error"
complete -c $argv -o interaction=batchmode -d "Set interation mode"
complete -c $argv -o interaction=nonstopmode -d "Set interation mode"
complete -c $argv -o interaction=scrollmode -d "Set interation mode"
complete -c $argv -o interaction=errorstopmode -d "Set interation mode"
complete -c $argv -o output-directory= -x -a "(__fish_complete_directories (commandline -ct))" -d "Output directory"
complete -c $argv -o shell-escape -d "Enable \write18{SHELL COMMAND}"
complete -c $argv -o no-shell-escape -d "Disable \write18{SHELL COMMAND}"
complete -c $argv -o src-specials -d "Insert source specials into the DVI file"
end