summaryrefslogtreecommitdiff
path: root/completions/passwd
diff options
context:
space:
mode:
Diffstat (limited to 'completions/passwd')
-rw-r--r--completions/passwd29
1 files changed, 29 insertions, 0 deletions
diff --git a/completions/passwd b/completions/passwd
new file mode 100644
index 00000000..66f7773e
--- /dev/null
+++ b/completions/passwd
@@ -0,0 +1,29 @@
+# passwd(1) completion
+
+_passwd()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ case $prev in
+ -n|--minimum|-x|--maximum|-w|--warning|-i|--inactive|-\?|--help|--usage)
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
+ return 0
+ fi
+
+ _allowed_users
+} &&
+complete -F _passwd passwd
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh