summaryrefslogtreecommitdiffstats
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 0000000..a2dc3ed
--- /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