aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-12-13 06:37:27 +1000
committerGravatar axel <axel@liljencrantz.se>2006-12-13 06:37:27 +1000
commit6c8a559023cc7ba950ee9e55176f6fe3e6335c03 (patch)
tree6d62aaf53ef542ebbf2f95b665a4ec2e4fa7acd1 /share
parentca8c337c941c46f4fa40336a1979b5d364a7509b (diff)
Drop unneeded '--' when using set builtin in various places
darcs-hash:20061212203727-ac50b-23fbb54bba0c5773e8a3dd2e5737ea8a670c801d.gz
Diffstat (limited to 'share')
-rw-r--r--share/completions/cvs.fish2
-rw-r--r--share/completions/kill.fish6
-rw-r--r--share/completions/rpm.fish12
-rw-r--r--share/functions/__fish_complete_directories.fish6
-rw-r--r--share/functions/__fish_complete_suffix.fish10
-rw-r--r--share/functions/__fish_contains_opt.fish4
-rw-r--r--share/functions/__fish_is_first_token.fish4
-rw-r--r--share/functions/__fish_seen_subcommand_from.fish2
-rw-r--r--share/functions/contains.fish2
-rw-r--r--share/functions/vared.fish2
10 files changed, 25 insertions, 25 deletions
diff --git a/share/completions/cvs.fish b/share/completions/cvs.fish
index 380f4a5c..0c911cb2 100644
--- a/share/completions/cvs.fish
+++ b/share/completions/cvs.fish
@@ -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
diff --git a/share/completions/kill.fish b/share/completions/kill.fish
index cfb111bf..d7842791 100644
--- a/share/completions/kill.fish
+++ b/share/completions/kill.fish
@@ -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\"
diff --git a/share/completions/rpm.fish b/share/completions/rpm.fish
index a0abf10f..f060a0e9 100644
--- a/share/completions/rpm.fish
+++ b/share/completions/rpm.fish
@@ -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')
diff --git a/share/functions/__fish_complete_directories.fish b/share/functions/__fish_complete_directories.fish
index ac231b58..464a73ce 100644
--- a/share/functions/__fish_complete_directories.fish
+++ b/share/functions/__fish_complete_directories.fish
@@ -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
diff --git a/share/functions/__fish_complete_suffix.fish b/share/functions/__fish_complete_suffix.fish
index ab0a7ff5..b3003553 100644
--- a/share/functions/__fish_complete_suffix.fish
+++ b/share/functions/__fish_complete_suffix.fish
@@ -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
diff --git a/share/functions/__fish_contains_opt.fish b/share/functions/__fish_contains_opt.fish
index ec7eb671..f38adb40 100644
--- a/share/functions/__fish_contains_opt.fish
+++ b/share/functions/__fish_contains_opt.fish
@@ -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
diff --git a/share/functions/__fish_is_first_token.fish b/share/functions/__fish_is_first_token.fish
index e2ca69b1..6f943ea7 100644
--- a/share/functions/__fish_is_first_token.fish
+++ b/share/functions/__fish_is_first_token.fish
@@ -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 '-*'
diff --git a/share/functions/__fish_seen_subcommand_from.fish b/share/functions/__fish_seen_subcommand_from.fish
index 508b635b..b01498ed 100644
--- a/share/functions/__fish_seen_subcommand_from.fish
+++ b/share/functions/__fish_seen_subcommand_from.fish
@@ -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
diff --git a/share/functions/contains.fish b/share/functions/contains.fish
index 10dee394..d9987fac 100644
--- a/share/functions/contains.fish
+++ b/share/functions/contains.fish
@@ -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]
#
diff --git a/share/functions/vared.fish b/share/functions/vared.fish
index 979cc594..b93f5bb4 100644
--- a/share/functions/vared.fish
+++ b/share/functions/vared.fish
@@ -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