summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2013-02-02 21:01:18 +0200
committerVille Skyttä <ville.skytta@iki.fi>2013-02-02 21:01:18 +0200
commit452e938766c784ce6750f8a718cb90a84b2e9d7d (patch)
treea5e000caff8d6c655a18af66e0738ed3262368eb
parent250d5eb93256bec97be3f5a01a1344939928b978 (diff)
downloadbash-completion-452e938766c784ce6750f8a718cb90a84b2e9d7d.tar.gz
acpi,chpasswd,dmesg,gkrellm,groupmems,hwclock,lastlog,pwd,vipw: Complete options even without "-" given.
-rw-r--r--completions/acpi3
-rw-r--r--completions/chpasswd7
-rw-r--r--completions/dmesg9
-rw-r--r--completions/gkrellm5
-rw-r--r--completions/groupmems5
-rw-r--r--completions/hwclock6
-rw-r--r--completions/lastlog7
-rw-r--r--completions/pwd8
-rw-r--r--completions/vipw5
9 files changed, 17 insertions, 38 deletions
diff --git a/completions/acpi b/completions/acpi
index ccc5b635..16ae0d6e 100644
--- a/completions/acpi
+++ b/completions/acpi
@@ -15,8 +15,7 @@ _acpi()
;;
esac
- [[ $cur == -* ]] && \
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
} &&
complete -F _acpi acpi
diff --git a/completions/chpasswd b/completions/chpasswd
index d8a7e62c..499ec93b 100644
--- a/completions/chpasswd
+++ b/completions/chpasswd
@@ -18,11 +18,8 @@ _chpasswd()
$split && return 0
- if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
- [[ $COMPREPLY == *= ]] && compopt -o nospace
- return 0
- fi
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ [[ $COMPREPLY == *= ]] && compopt -o nospace
} &&
complete -F _chpasswd chpasswd
diff --git a/completions/dmesg b/completions/dmesg
index 7d73bf3a..3d9bc662 100644
--- a/completions/dmesg
+++ b/completions/dmesg
@@ -22,12 +22,9 @@ _dmesg()
;;
esac
- if [[ $cur == -* ]]; then
- local opts=$( _parse_help "$1" )
- [[ $opts ]] || opts=$( _parse_usage "$1" )
- COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
- return
- fi
+ local opts=$( _parse_help "$1" )
+ [[ $opts ]] || opts=$( _parse_usage "$1" )
+ COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
} &&
complete -F _dmesg dmesg
diff --git a/completions/gkrellm b/completions/gkrellm
index f7979b96..db439ebd 100644
--- a/completions/gkrellm
+++ b/completions/gkrellm
@@ -32,10 +32,7 @@ _gkrellm()
;;
esac
- if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
- fi
-
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
} &&
complete -F _gkrellm gkrellm gkrellm2
diff --git a/completions/groupmems b/completions/groupmems
index b29d548d..9c993eb7 100644
--- a/completions/groupmems
+++ b/completions/groupmems
@@ -20,10 +20,7 @@ _groupmems()
;;
esac
- if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
- return 0
- fi
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
} &&
complete -F _groupmems groupmems
diff --git a/completions/hwclock b/completions/hwclock
index e9d77aa2..9f8f9b15 100644
--- a/completions/hwclock
+++ b/completions/hwclock
@@ -11,12 +11,12 @@ _hwclock()
;;
-f|--rtc|--adjfile)
_filedir
+ return
;;
esac
- [[ $cur == -* ]] && \
- COMPREPLY=( $( PATH="$PATH:/sbin"
- compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=(
+ $( PATH="$PATH:/sbin" compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
} &&
complete -F _hwclock hwclock
diff --git a/completions/lastlog b/completions/lastlog
index 8663afd7..a8724029 100644
--- a/completions/lastlog
+++ b/completions/lastlog
@@ -17,11 +17,8 @@ _lastlog()
$split && return 0
- if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
- [[ $COMPREPLY == *= ]] && compopt -o nospace
- return 0
- fi
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ [[ $COMPREPLY == *= ]] && compopt -o nospace
} &&
complete -F _lastlog lastlog
diff --git a/completions/pwd b/completions/pwd
index 8818b49d..ca00a3ff 100644
--- a/completions/pwd
+++ b/completions/pwd
@@ -11,11 +11,9 @@ _pwd()
;;
esac
- if [[ $cur == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
- [[ $COMPREPLY ]] || \
- COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
- fi
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ [[ $COMPREPLY ]] || \
+ COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
} &&
complete -F _pwd pwd
diff --git a/completions/vipw b/completions/vipw
index c71c6bbf..2220f2e8 100644
--- a/completions/vipw
+++ b/completions/vipw
@@ -15,10 +15,7 @@ _vipw()
;;
esac
- if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
- return 0
- fi
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
} &&
complete -F _vipw vipw vigr