From b0c6d891e967267468ac59befa60e9844be3d949 Mon Sep 17 00:00:00 2001 From: Jan Kanis Date: Wed, 25 Jan 2012 01:14:47 +0100 Subject: [PATCH] reviewed merge reqest 14: * fixed some whitespace inconsistencies * changed variable handling in __fish_complete_subcommand_root --- .../functions/__fish_complete_subcommand.fish | 18 +++++++-------- .../__fish_complete_subcommand_root.fish | 6 +---- share/functions/__fish_complete_tex.fish | 22 +++++++++---------- 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/share/functions/__fish_complete_subcommand.fish b/share/functions/__fish_complete_subcommand.fish index 885b05442..c71f3fea5 100644 --- a/share/functions/__fish_complete_subcommand.fish +++ b/share/functions/__fish_complete_subcommand.fish @@ -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 diff --git a/share/functions/__fish_complete_subcommand_root.fish b/share/functions/__fish_complete_subcommand_root.fish index 8a753709d..f4df8d9d3 100644 --- a/share/functions/__fish_complete_subcommand_root.fish +++ b/share/functions/__fish_complete_subcommand_root.fish @@ -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 diff --git a/share/functions/__fish_complete_tex.fish b/share/functions/__fish_complete_tex.fish index 1c8876feb..ecff08714 100644 --- a/share/functions/__fish_complete_tex.fish +++ b/share/functions/__fish_complete_tex.fish @@ -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