summaryrefslogtreecommitdiff
path: root/completions/_newgrp
diff options
context:
space:
mode:
Diffstat (limited to 'completions/_newgrp')
-rw-r--r--completions/_newgrp19
1 files changed, 19 insertions, 0 deletions
diff --git a/completions/_newgrp b/completions/_newgrp
new file mode 100644
index 00000000..0f0d3f93
--- /dev/null
+++ b/completions/_newgrp
@@ -0,0 +1,19 @@
+# newgrp(1) completion -*- shell-script -*-
+
+# Use of this file is deprecated on Linux. Upstream completion is
+# available in util-linux >= 2.23, use that instead.
+
+_newgrp()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ if [[ "$cur" == "-" ]]; then
+ COMPREPLY=( - )
+ else
+ _allowed_groups "$cur"
+ fi
+} &&
+complete -F _newgrp newgrp
+
+# ex: filetype=sh