summaryrefslogtreecommitdiff
path: root/Completion/Linux
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Linux')
-rw-r--r--Completion/Linux/Command/_gpasswd21
-rw-r--r--Completion/Linux/Command/_htop10
-rw-r--r--Completion/Linux/Command/_kpartx14
3 files changed, 45 insertions, 0 deletions
diff --git a/Completion/Linux/Command/_gpasswd b/Completion/Linux/Command/_gpasswd
new file mode 100644
index 000000000..9b4bedec6
--- /dev/null
+++ b/Completion/Linux/Command/_gpasswd
@@ -0,0 +1,21 @@
+#compdef gpasswd
+local curcontext=$curcontext state state_descr line
+typeset -A opt_args
+
+_arguments -C -w -s \
+ '(-a --add -d --delete)'{-a,--add}'[add user to group]: : _users' \
+ '(-d --delete -a --add)'{-d,--delete}'[remove user from group]: : _users' \
+ '(-h --help)'{-h,--help}'[display help]' \
+ '(-Q --root)'{-Q,--root}'[directory to chroot into]: : _files -/' \
+ '(-r --remove-password)'{-r,--remove-password}'[remove the group password]' \
+ '(-R --restrict)'{-R,--restrict}'[restrict access to GROUP to its members]' \
+ '(-M --members -A --administrators)'{-M,--members}'[set the list of members of GROUP]: :->users' \
+ '(-A --administrators -M --members)'{-A,--administrators}'[set the list of admins for GROUP]: :->users' \
+ '1: : _groups'
+
+if [[ $state == users ]]; then
+ local -a ignore
+ compset -P '*,'; compset -S ',*'
+ ignore=( ${(s:,:)IPREFIX} ${(s:,:)ISUFFIX} )
+ _users -F ignore -qS ,
+fi
diff --git a/Completion/Linux/Command/_htop b/Completion/Linux/Command/_htop
new file mode 100644
index 000000000..9a6133a86
--- /dev/null
+++ b/Completion/Linux/Command/_htop
@@ -0,0 +1,10 @@
+#compdef htop
+
+_arguments -S : \
+ '(-d --delay)'{-d+,--delay=}'[update frequency]:duration' \
+ '(-C --no-color --no-colour)'{-C,--no-colo{,u}r}'[monochrome mode]' \
+ '(-h --help)'{-h,--help}'[display help]' \
+ '(-p --pid)'{-p+,--pid=}'[show given pids]: : _sequence -n ${$(</proc/sys/kernel/pid_max)\:-32768} _pids' \
+ '(-s --sort-key)'{-s+,--sort-key=}'[sort by key]:key:( ${(f)"$($service --sort-key help)"} )' \
+ '(-u --user)'{-u+,--user=}'[show processes of user]: : _users' \
+ '(-v --version)'{-v,--version}'[print version information]'
diff --git a/Completion/Linux/Command/_kpartx b/Completion/Linux/Command/_kpartx
new file mode 100644
index 000000000..11c614c01
--- /dev/null
+++ b/Completion/Linux/Command/_kpartx
@@ -0,0 +1,14 @@
+#compdef kpartx
+
+_arguments -s -w : \
+ '-a[add partition mappings]' \
+ '-r[read-only partition mappings]' \
+ '-d[delete partition mappings]' \
+ '-u[update partition mappings]' \
+ '-l[list partition mappings]' \
+ '-p[set device name-partition number delimiter]' \
+ '-f[force creation of mappings]' \
+ '-g[force GUID partition table]' \
+ '-v[Operate verbosely]' \
+ '-s[don'\''t return until the partitions are created]' \
+ '1: : _files'