From 789fd75316c26ae394c3c32f7664139fc996a110 Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Fri, 6 Feb 2009 17:28:15 +0100 Subject: [PATCH] zshrc: provide .. as a completion There was a bug in some 4.3.x versions of zsh, that enabled the completion of .. by default. That was a bug! This change does *not* provide '.' as a possible completion. But that is easily possible and an according snippet is included among the examples in etc/skel/.zshrc (commented out, as usual). --- etc/skel/.zshrc | 3 +++ etc/zsh/zshrc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index 776f6e7..7915971 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -101,6 +101,9 @@ #) #zstyle ':completion:*:*:telnet:*' users-hosts-ports $telnet_users_hosts_ports +## the default grml setup provides '..' as a completion. it does not provide +## '.' though. If you want that too, use the following line: +#zstyle ':completion:*' special-dirs true ## aliases ## diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index f78f927..67fc640 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2436,6 +2436,9 @@ grmlcomp() { zstyle ':completion:*:manuals.*' insert-sections true zstyle ':completion:*:man:*' menu yes select + # provide .. as a completion + zstyle ':completion:*' special-dirs .. + # run rehash on completion so new installed program are found automatically: _force_rehash() { (( CURRENT == 1 )) && rehash -- 2.1.4