[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-126-ge35eabb
Ville Skyttä
ville.skytta at iki.fi
Tue Apr 26 08:02:28 UTC 2011
The following commit has been merged in the master branch:
commit f48d6fb10d13d7bdf28d76dab0d87e466d1c3571
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Mon Apr 25 23:44:08 2011 +0300
Use {x..y} brace expansion instead of `seq', loops, or long literal sequences.
diff --git a/completions/_yum b/completions/_yum
index 063b982..11b2512 100644
--- a/completions/_yum
+++ b/completions/_yum
@@ -95,7 +95,7 @@ _yum()
_filedir rpm
;;
-d|-e)
- COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9 10' -- $cur ) )
+ COMPREPLY=( $( compgen -W '{0..10}' -- $cur ) )
;;
-c)
_filedir
diff --git a/completions/ant b/completions/ant
index f412429..d1ee16e 100644
--- a/completions/ant
+++ b/completions/ant
@@ -21,7 +21,7 @@ _ant()
return 0
;;
-nice)
- COMPREPLY=( $( compgen -W '1 2 3 4 5 6 7 8 9 10' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{1..10}' -- "$cur" ) )
return 0
;;
-lib|-logger|-listener|-D|-inputhandler|-main)
diff --git a/completions/chkconfig b/completions/chkconfig
index 37941d4..d335974 100644
--- a/completions/chkconfig
+++ b/completions/chkconfig
@@ -16,7 +16,7 @@ _chkconfig()
return 0
;;
--level)
- COMPREPLY=( $( compgen -W '1 2 3 4 5 6' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{1..6}' -- "$cur" ) )
return 0
;;
esac
diff --git a/completions/cvs b/completions/cvs
index 2e47861..0623b3f 100644
--- a/completions/cvs
+++ b/completions/cvs
@@ -369,7 +369,7 @@ _cvs()
return 0
;;
-z)
- COMPREPLY=( $( compgen -W '1 2 3 4 5 6 7 8 9' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{1..9}' -- "$cur" ) )
return 0
;;
esac
diff --git a/completions/cvsps b/completions/cvsps
index a3e2388..e04aa4f 100644
--- a/completions/cvsps
+++ b/completions/cvsps
@@ -40,7 +40,7 @@ _cvsps()
return 0
;;
-Z)
- COMPREPLY=( $( compgen -W '1 2 3 4 5 6 7 8 9' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{1..9}' -- "$cur" ) )
return 0
;;
--root)
diff --git a/completions/findutils b/completions/findutils
index 8590c3d..23260e4 100644
--- a/completions/findutils
+++ b/completions/findutils
@@ -11,7 +11,7 @@ _find()
case $prev in
-maxdepth|-mindepth)
- COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{0..9}' -- "$cur" ) )
return 0
;;
-newer|-anewer|-cnewer|-fls|-fprint|-fprint0|-fprintf|-name|-iname|\
diff --git a/completions/ipmitool b/completions/ipmitool
index 121c9dd..c710f0f 100644
--- a/completions/ipmitool
+++ b/completions/ipmitool
@@ -40,8 +40,7 @@ _ipmitool()
return 0
;;
-C)
- COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9 10 11 12 13 14' \
- -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{0..14}' -- "$cur" ) )
return 0
;;
-L)
diff --git a/completions/java b/completions/java
index ee3e513..aba9513 100644
--- a/completions/java
+++ b/completions/java
@@ -332,7 +332,7 @@ _pack200()
return 0
;;
-E|--effort)
- COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{0..9}' -- "$cur" ) )
return 0
;;
-H|--deflate-hint)
diff --git a/completions/lrzip b/completions/lrzip
index ffd95a7..77e42d0 100644
--- a/completions/lrzip
+++ b/completions/lrzip
@@ -31,17 +31,15 @@ _lrzip()
return 0
;;
-L)
- COMPREPLY=( $( compgen -W '1 2 3 4 5 6 7 8 9' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{1..9}' -- "$cur" ) )
return 0
;;
-T)
- COMPREPLY=( $( compgen -W '1 2 3 4 5 6 7 8 9 10' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{1..10}' -- "$cur" ) )
return 0
;;
-N)
- COMPREPLY=( $( compgen -W '-20 -19 -18 -17 -16 -15 -14 -13 -12 \
- -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 \
- 12 13 14 15 16 17 18 19' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{-20..19}' -- "$cur" ) )
return 0
;;
esac
diff --git a/completions/mcrypt b/completions/mcrypt
index c2d6dbb..fc086ca 100644
--- a/completions/mcrypt
+++ b/completions/mcrypt
@@ -9,7 +9,7 @@ _mcrypt()
case $prev in
-g|--openpgp-z)
- COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{0..9}' -- "$cur" ) )
return 0
;;
-o|--keymode)
diff --git a/completions/rsync b/completions/rsync
index da3334e..01f66a4 100644
--- a/completions/rsync
+++ b/completions/rsync
@@ -32,7 +32,7 @@ _rsync()
;;
--compress-level)
compopt +o nospace
- COMPREPLY=( $( compgen -W '1 2 3 4 5 6 7 8 9' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{1..9}' -- "$cur" ) )
return 0
;;
esac
diff --git a/completions/samba b/completions/samba
index 30cb375..fb5d42d 100644
--- a/completions/samba
+++ b/completions/samba
@@ -25,7 +25,7 @@ _samba_hosts()
_samba_debuglevel()
{
- COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9 10' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{0..10}' -- "$cur" ) )
}
_smbclient()
diff --git a/completions/smartctl b/completions/smartctl
index e48b3b7..9d17c56 100644
--- a/completions/smartctl
+++ b/completions/smartctl
@@ -10,22 +10,11 @@ _smartctl_device()
{
case $cur in
areca*|3ware*|megaraid*|cciss*)
- local i mycur="${cur%%,*}"
- for (( i=0; i <= 31; i++ )) ; do
- COMPREPLY+=( "$mycur,$i" )
- done
+ COMPREPLY+=( ${cur%%,*},{0..31} )
COMPREPLY=( $( compgen -W '"${COMPREPLY[@]}"' -- "$cur" ) )
;;
hpt*)
- local l m n
- for (( l=1; l <= 4; l++ )) ; do
- for (( m=1; m <= 8; m++ )) ; do
- COMPREPLY+=( hpt,$l/$m )
- for (( n=1; n <= 5; n++ )) ; do
- COMPREPLY+=( hpt,$l/$m/$n )
- done
- done
- done
+ COMPREPLY+=( hpt,{1..4}/{1..8} hpt,{1..4}/{1..8}/{1..5} )
COMPREPLY=( $( compgen -W '"${COMPREPLY[@]}"' -- "$cur" ) )
;;
*)
diff --git a/completions/wodim b/completions/wodim
index 0c6b4d4..5431b83 100644
--- a/completions/wodim
+++ b/completions/wodim
@@ -52,8 +52,7 @@ _cdrecord()
awk 'NR > 1 { print $1 }' ) help" -- "$cur" ) )
;;
minbuf)
- COMPREPLY=( $( compgen -W "$( seq 25 95 2>/dev/null )" \
- -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '{25..95}' -- "$cur" ) )
;;
esac
return 0
--
bash-completion
More information about the Bash-completion-commits
mailing list