[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-121-g452e938
Ville Skyttä
ville.skytta at iki.fi
Sat Feb 2 19:04:29 UTC 2013
The following commit has been merged in the master branch:
commit 452e938766c784ce6750f8a718cb90a84b2e9d7d
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Feb 2 21:01:18 2013 +0200
acpi,chpasswd,dmesg,gkrellm,groupmems,hwclock,lastlog,pwd,vipw: Complete options even without "-" given.
diff --git a/completions/acpi b/completions/acpi
index ccc5b63..16ae0d6 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 d8a7e62..499ec93 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 7d73bf3..3d9bc66 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 f7979b9..db439eb 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 b29d548..9c993eb 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 e9d77aa..9f8f9b1 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 8663afd..a872402 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 8818b49..ca00a3f 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 c71c6bb..2220f2e 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
--
bash-completion
More information about the Bash-completion-commits
mailing list