Drop unneeded '--' when using set builtin in various places

darcs-hash:20061212203727-ac50b-23fbb54bba0c5773e8a3dd2e5737ea8a670c801d.gz
This commit is contained in:
axel 2006-12-13 06:37:27 +10:00
parent ca8c337c94
commit 6c8a559023
10 changed files with 25 additions and 25 deletions

View file

@ -6,7 +6,7 @@
function __fish_no_cvs_subcommand
set -l cvscommands add admin annotate checkout commit diff edit editors export history import init kserver log login logout pserver rannotate rdiff release remove rlog rtag server status tag unedit update version watch watchers
set -l -- cmd (commandline -poc)
set -l cmd (commandline -poc)
set -e cmd[1]
for i in $cmd
if contains -- $i $cvscommands

View file

@ -9,7 +9,7 @@ if kill -L ^/dev/null >/dev/null
complete -c kill -s L -d (N_ "List codes and names of available signals")
set -- signals (kill -L | sed -e 's/\([0-9][0-9]*\) *\([A-Z,0-9][A-Z,0-9]*\)/\1 \2\n/g;s/ +/ /g' | sed -e 's/^ //' | sgrep -E '^[^ ]+')
set signals (kill -L | sed -e 's/\([0-9][0-9]*\) *\([A-Z,0-9][A-Z,0-9]*\)/\1 \2\n/g;s/ +/ /g' | sed -e 's/^ //' | sgrep -E '^[^ ]+')
else
@ -25,8 +25,8 @@ else
end
for i in $signals
set -- number (echo $i | cut -d " " -f 1)
set -- name (echo $i | cut -d " " -f 2)
set number (echo $i | cut -d " " -f 1)
set name (echo $i | cut -d " " -f 2)
complete -c kill -o $number -d $name
complete -c kill -o $name -d $name
complete -c kill -o s -x -a \"$number\tSend\ $name\ signal\"

View file

@ -18,7 +18,7 @@ complete -c rpm -l root -d (N_ "Specify root directory for rpm operations") -a "
)
"
set -- rpm_install -c rpm -n "__fish_contains_opt -s i -s U -s F install upgrade freshen"
set rpm_install -c rpm -n "__fish_contains_opt -s i -s U -s F install upgrade freshen"
complete $rpm_install -l aid -d (N_ "Add suggested packages to the transaction set when needed")
complete $rpm_install -l allfiles -d (N_ "Installs or upgrades all the files in the package, even if they aren't needed (missingok) and don't exist")
complete $rpm_install -l badreloc -d (N_ "Used with --relocate, permit relocations on all file paths, not just those OLD-PATH's included in the binary package relocation hint(s)")
@ -55,7 +55,7 @@ complete $rpm_install -l replacepkgs -d (N_ 'Install the packages even if some o
complete $rpm_install -l test -d (N_ "Don't install the package, simply check for and report potential conflicts")
set -e rpm_install
set -- rpm_query -c rpm -n "__fish_contains_opt -s q query"
set rpm_query -c rpm -n "__fish_contains_opt -s q query"
complete $rpm_query -l changelog -d (N_ 'Display change information for the package')
complete $rpm_query -s c -l configfiles -d (N_ 'List only configuration files (implies -l)')
complete $rpm_query -s d -l docfiles -d (N_ 'List only documentation files (implies -l)')
@ -72,7 +72,7 @@ complete $rpm_query -l triggers -d (N_ 'Display the trigger scripts contained in
complete $rpm_query -l triggerscripts -d (N_ 'Display the trigger scripts contained in the package')
set -e rpm_query
set -- rpm_select -c rpm -n "__fish_contains_opt -s q -s V query verify"
set rpm_select -c rpm -n "__fish_contains_opt -s q -s V query verify"
complete $rpm_select -a "(__fish_print_packages)"
complete $rpm_select -s a -l all -d (N_ 'Query all installed packages')
@ -89,7 +89,7 @@ complete $rpm_select -l whatprovides -d (N_ 'Query all packages that provide the
complete $rpm_select -l whatrequires -d (N_ 'Query all packages that requires the specified capability for functioning') -x
set -e rpm_select
set -- rpm_verify -c rpm -n "__fish_contains_opt -s V verify"
set rpm_verify -c rpm -n "__fish_contains_opt -s V verify"
complete $rpm_verify -l nodeps -d (N_ "Don't verify dependencies of packages")
complete $rpm_verify -l nodigest -d (N_ "Don't verify package or header digests when reading")
complete $rpm_verify -l nofiles -d (N_ "Don't verify any attributes of package files")
@ -105,7 +105,7 @@ complete $rpm_verify -l nomode -d (N_ "Don't verify mode attribute")
complete $rpm_verify -l nordev -d (N_ "Don't verify dev attribute")
set -e rpm_verify
set -- rpm_erase -c rpm -n "__fish_contains_opt -s e erase"
set rpm_erase -c rpm -n "__fish_contains_opt -s e erase"
complete $rpm_erase -a "(__fish_print_packages)"
complete $rpm_erase -l allmatches -d (N_ 'Remove all versions of the package which match specified string')
complete $rpm_erase -l nodeps -d (N_ "Don't check dependencies before uninstalling the packages")
@ -119,7 +119,7 @@ complete $rpm_erase -l repackage -d (N_ 'Re-package the files before erasing')
complete $rpm_erase -l test -d (N_ "Don't really uninstall anything" )
set -e rpm_erase
set -- rpm_mode -c rpm -n '__fish_contains_opt -s e -s i -s F -s V -s U -s q erase install freshen verify upgrade query; if test $status = 0; false; else; true; end'
set rpm_mode -c rpm -n '__fish_contains_opt -s e -s i -s F -s V -s U -s q erase install freshen verify upgrade query; if test $status = 0; false; else; true; end'
complete $rpm_mode -s i -l install -d (N_ 'Install new package')
complete $rpm_mode -s U -l upgrade -d (N_ 'Upgrade existing package')
complete $rpm_mode -s F -l freshen -d (N_ 'Upgrade package if already installed')

View file

@ -5,14 +5,14 @@
function __fish_complete_directories -d "Complete using directories"
set -- comp $argv[1]
set -- desc (_ Directory)
set comp $argv[1]
set desc (_ Directory)
if test (count $argv) -gt 1
set desc $argv[2]
end
eval "set -- dirs "$comp"*/"
eval "set dirs "$comp"*/"
if test $dirs[1]
printf "%s\t$desc\n" $dirs

View file

@ -5,12 +5,12 @@
function __fish_complete_suffix -d "Complete using files"
set -- comp $argv[1]
set -- suff $argv[2]
set -- desc $argv[3]
set comp $argv[1]
set suff $argv[2]
set desc $argv[3]
set -- base (echo $comp |sed -e 's/\.[a-zA-Z0-9]*$//')
eval "set -- files $base*$suff"
set base (echo $comp |sed -e 's/\.[a-zA-Z0-9]*$//')
eval "set files $base*$suff"
if test $files[1]
printf "%s\t$desc\n" $files

View file

@ -8,7 +8,7 @@ function __fish_contains_opt -d "Checks if a specific option has been given in t
for i in $argv
if test $next_short
set next_short
set -- short_opt $short_opt $i
set short_opt $short_opt $i
else
switch $i
case -s
@ -18,7 +18,7 @@ function __fish_contains_opt -d "Checks if a specific option has been given in t
return 1
case '**'
set -- long_opt $long_opt $i
set long_opt $long_opt $i
end
end
end

View file

@ -1,7 +1,7 @@
function __fish_is_first_token -d 'Test if no non-switch argument has been specified yet'
set -- cmd (commandline -poc)
set -e -- cmd[1]
set cmd (commandline -poc)
set -e cmd[1]
for i in $cmd
switch $i
case '-*'

View file

@ -5,7 +5,7 @@
#
function __fish_seen_subcommand_from
set -l -- cmd (commandline -poc)
set -l cmd (commandline -poc)
set -e cmd[1]
for i in $cmd
if contains -- $i $argv

View file

@ -29,7 +29,7 @@ function contains -d (N_ "Test if a key is contained in a set of values")
return 1
end
set -- key $argv[1]
set key $argv[1]
set -e argv[1]
#

View file

@ -20,7 +20,7 @@ function vared -d (N_ "Edit variable value")
if test (count $$argv ) -lt 2
set init ''
if test $$argv
set -- init $$argv
set init $$argv
end
set prompt 'set_color green; echo '$argv'; set_color normal; echo "> "'
read -p $prompt -c $init tmp