diff options
author | Gautam <gi1242+zsh@gmail.com> | 2017-10-15 14:59:32 -0400 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2017-10-16 09:46:14 +0100 |
commit | 82b275d53ad0f367f78cbd41b68b26ca9c08ca8d (patch) | |
tree | dd6dd8286fa9a4f5d70b4e46960b83bcabe00d6a /Completion | |
parent | 96845524a66aecfd4fa01f1b23f80bbf753f1130 (diff) | |
download | zsh-82b275d53ad0f367f78cbd41b68b26ca9c08ca8d.tar.gz zsh-82b275d53ad0f367f78cbd41b68b26ca9c08ca8d.tar.xz zsh-82b275d53ad0f367f78cbd41b68b26ca9c08ca8d.zip |
41904: new deborphan and updated xrandr completions
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Debian/Command/_deborphan | 42 | ||||
-rw-r--r-- | Completion/X/Command/_xrandr | 7 |
2 files changed, 47 insertions, 2 deletions
diff --git a/Completion/Debian/Command/_deborphan b/Completion/Debian/Command/_deborphan new file mode 100644 index 000000000..f52d0d7e7 --- /dev/null +++ b/Completion/Debian/Command/_deborphan @@ -0,0 +1,42 @@ +#compdef deborphan + +local keep=/var/lib/deborphan/keep +_arguments : \ + {--help,-h}'[help]' \ + {--status-file,-f}'[statusfile]:file:_files' \ + {--version,-v}'[version]' \ + {--show-deps,-d}'[show dependencies for packages that have them]' \ + {--show-priority,-P}'[show priority of packages found]' \ + {--show-section,-s}'[show the sections the packages are in]' \ + --no-show-section'[do not show sections]' \ + {--show-size,-z}'[show installed size of packages found]' \ + {--all-packages,-a}'[compare all packages, not just libs]' \ + {--exclude,-e}'[work as if packages in LIST were not installed]:LIST:' \ + {--force-hold,-H}'[Ignore hold flags.]' \ + {--nice-mode,-n}'[Disable checks for "recommends" and "suggests".]' \ + --ignore-recommends'[Disable checks for recommends.]' \ + --ignore-suggests'[Disable checks for "suggests".]' \ + {--priority,-p}'[PRIOR Select only packages with priority >= PRIOR.]:PRIOR:' \ + --find-config'[Find "orphaned" configuration files.]' \ + --libdevel'[Search in libdevel in addition to libs and oldlibs.]' \ + {--add-keep,-A}'[PKGS.. Never report PKGS.]:*:package:_deb_packages installed' \ + {--keep-file,-k}'[Use FILE to get/store info about kept packages.]:file:_files' \ + {--list-keep,-L}'[List the packages that are never reported.]' \ + {--del-keep,-R}"[PKGS.. Remove PKGS from the 'keep' file.]:*:package:_values package $(< $keep)" \ + {--zero-keep,-Z}'[Remove all packages from the "keep" file.]' \ + --guess-common'[Try to report common packages.]' \ + --guess-data'[Try to report data packages.]' \ + --guess-debug'[Try to report debugging libraries.]' \ + --guess-dev'[Try to report development packages.]' \ + --guess-doc'[Try to report documentation packages.]' \ + --guess-dummy'[Try to report dummy packages.]' \ + --guess-kernel'[Try to report kernel modules.]' \ + --guess-interpreters'[Try to report interpreter libraries.]' \ + --guess-mono'[Try to report mono libraries.]' \ + --guess-perl'[Try to report perl libraries.]' \ + --guess-pike'[Try to report pike libraries.]' \ + --guess-python'[Try to report python libraries.]' \ + --guess-ruby'[Try to report ruby libraries.]' \ + --guess-section'[Try to report libraries in wrong sections.]' \ + --guess-all'[Try all of the above.]' \ + --guess-only'[Use --guess options only.]' diff --git a/Completion/X/Command/_xrandr b/Completion/X/Command/_xrandr index b0851569e..26d8cd082 100644 --- a/Completion/X/Command/_xrandr +++ b/Completion/X/Command/_xrandr @@ -58,8 +58,11 @@ case $state in esac ;; outputs) - _wanted outputs expl output compadd \ - ${(uo)${(M)${(f)"$(_call_program outputs xrandr)"}:#* connected*}%% *} && return 0 + local -a xrandr_output=(${(f)"$(_call_program outputs xrandr)"}) + _alternative \ + 'connected:connected outputs:('${(j: :)${(uo)${(M)xrandr_output:#* connected*}%% *}}')' \ + 'disconnected:disconnected outputs:('${(j: :)${(uo)${(M)xrandr_output:#* disconnected*}%% *}}')' \ + && return 0 ;; modes) _wanted modes expl mode compadd \ |