zshrc: provide .. as a completion
authorFrank Terbeck <ft@bewatermyfriend.org>
Fri, 6 Feb 2009 16:28:15 +0000 (17:28 +0100)
committerFrank Terbeck <ft@bewatermyfriend.org>
Sun, 8 Feb 2009 12:32:03 +0000 (13:32 +0100)
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
etc/zsh/zshrc

index 776f6e7..7915971 100644 (file)
 #)
 #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 ##
 
index f78f927..67fc640 100644 (file)
@@ -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