From 4ae2112821835457375d257c1939da1385f92b32 Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Sat, 4 Apr 2009 11:45:47 +0200 Subject: [PATCH] zshrc: do not overrule native completions to _gnu_generic Only compdef commands to _gnu_generic if no native completion exists. This should fix problems with _gnu_generic and output from cp of coreutils version 7.1. --- debian/changelog | 4 +++- etc/zsh/zshrc | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b2c6d3e..49a97ad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,10 +2,12 @@ grml-etc-core (0.3.66) unstable; urgency=low * vimrc: only set screen title if the caller explicitly asks for it. * zshrc: ask for setting screen title in vim via a wrapper function. + * zshrc: only compdef commands to _gnu_generic if no native completion + exists. * zshrc: add commit-to-history widget, that allows users to add command lines to zsh's history without executing [Closes: issue407] - -- Frank Terbeck Fri, 03 Apr 2009 22:49:53 +0200 + -- Frank Terbeck Sat, 04 Apr 2009 11:35:06 +0200 grml-etc-core (0.3.65) unstable; urgency=low diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index e76be64..e1e8a13 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2471,7 +2471,9 @@ grmlcomp() { # use generic completion system for programs not yet defined; (_gnu_generic works # with commands that provide a --help option with "standard" gnu-like output.) - compdef _gnu_generic tail head feh cp mv df stow uname ipacsum fetchipac + for compcom in tail head feh cp mv df stow uname ipacsum fetchipac; do + [[ -z ${_comps[$compcom]} ]] && compdef _gnu_generic ${compcom} + done; unset compcom # see upgrade function in this file compdef _hosts upgrade -- 2.1.4