diff options
author | Oliver Kiddle <opk@zsh.org> | 2021-10-23 18:15:43 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2021-10-23 18:15:43 +0200 |
commit | f414456b7acb9547361c3996ce6b57b465be2b20 (patch) | |
tree | 59e56794ced2062ee1672cb8fb767304a64dc0ce | |
parent | 0f1e4d8e78a9692eaf38da8fd4ee6b23b75e2fdf (diff) | |
download | zsh-f414456b7acb9547361c3996ce6b57b465be2b20.tar.gz zsh-f414456b7acb9547361c3996ce6b57b465be2b20.tar.xz zsh-f414456b7acb9547361c3996ce6b57b465be2b20.zip |
49500: new lsns completion
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Completion/Linux/Command/_lsns | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 0428248de..77209ca6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2021-10-23 Oliver Kiddle <opk@zsh.org> + + * 49500: Completion/Linux/Command/_lsns: new completion + 2021-10-16 dana <dana@dana.is> * github #79 (tweaked): Xavier Hsinyuan: diff --git a/Completion/Linux/Command/_lsns b/Completion/Linux/Command/_lsns new file mode 100644 index 000000000..994101d97 --- /dev/null +++ b/Completion/Linux/Command/_lsns @@ -0,0 +1,18 @@ +#compdef lsns + +local ign + +(( $#words > 2 )) && ign='!' +_arguments -s -S \ + '(-J --json)'{-J,--json}'[use JSON output format]' \ + '(-l --list)'{-l,--list}'[use list format output]' \ + '(-n --noheadings)'{-n,--noheadings}"[don't print headings]" \ + '(-o --output)'{-o,--output}'[define which output columns to use]:column:_sequence compadd -M "m\:{a-z}={A-Z}" - NS TYPE PATH NPROCS PID PPID COMMAND UID USER NETNSID NSFS' \ + '(-p --task)'{-p+,--task=}'[print process namespaces]:process id:_pids' \ + '(-r --raw)'{-r,--raw}'[use the raw output format]' \ + '(-u --notruncate)'{-u,--notruncate}"[don't truncate text in columns]" \ + '(-W --nowrap)'{-W,--nowrap}"[don't use multi-line representation]" \ + '(-t --type)'{-t+,--type=}'[filter by namespace type]:namespace type:(mnt net ipc user pid uts cgroup)' \ + "$ign(- *)"{-h,--help}'[display usage information]' \ + "$ign(- *)"{-V,--version}'[display version information]' \ + '*: :_guard "^-*" namespace' |