From: Dennis Haney <davh@davh.dk>
Cc: zsh-users@sunsite.dk
Subject: Re: cd ..<tab>?
Date: Tue, 05 Feb 2002 19:26:36 +0100 [thread overview]
Message-ID: <3C6023DC.5000001@davh.dk> (raw)
In-Reply-To: <1020205174636.ZM29789@candle.brasslantern.com>
Bart Schaefer wrote:
>On Feb 5, 6:19pm, Dennis Haney wrote:
>}
>} Bart Schaefer wrote:
>}
>} >>Is there a way to make this work properly with setopt GLOB_DOTS?
>} >
>
>} It want to ignore '..' when it is a stupid choice.
>} eg.
>} mkdir Z
>} cd Z/[tab]
>} should NOT complete to 'cd Z/../'
>} (unless CHASE_DOTS is on and 'cd Z/..' will be different from 'cd .')
>
>This is a case where you need 'zstyle -e'. You want the special-dirs
>style to be non-empty only in certain circumstances.
>
>This completes `..' only if the prefix is either empty, or has a leading
>`.' and contains no slashes:
>
> zstyle -e ':completion:*' special-dirs \
> '[[ $PREFIX = (|.[^/]#) ]] && reply=(..)'
>
heh Thanks. I didnt know I could run a "script" here :)
zstyle -e ':completion:*' special-dirs \
'[[ $PREFIX = (../)#(|.|..) ]] && reply=(..)'
This will continue to work with cd ../../../..[tab] while working with
cd .[tab]
Would you please add your (or my) little script to the documentation
under special-dirs? :)
>
>
>To find out that `Z/..' is not the same directory as `.' requires a bit
>of extra work, which I don't have time to do just now, but you can see
>how you'd just insert that into the conditions under which the reply
>array is set by the style.
>
I dont use CHASE_DOTS luckely :)
>
>http://www.well.com/user/barts http://www.brasslantern.com
>
>Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
>
--
Dennis
use Inline C => qq{void p(char*g){printf("Just Another %s Hacker\n",g);}};p("Perl");
prev parent reply other threads:[~2002-02-05 18:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-29 10:20 Bo Thorsen
2002-01-29 10:18 ` Sven Wischnowsky
2002-01-29 23:10 ` Dennis Haney
2002-01-30 1:12 ` Bart Schaefer
2002-02-05 17:19 ` Dennis Haney
[not found] ` <3C60140C.6020006@davh.dk>
2002-02-05 17:46 ` Bart Schaefer
2002-02-05 18:26 ` Dennis Haney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C6023DC.5000001@davh.dk \
--to=davh@davh.dk \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).