From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: Why doesn't cd ignore files when you type say "cd fred*"
Date: Thu, 4 Dec 2003 17:30:57 +0000 [thread overview]
Message-ID: <1031204173057.ZM17273@candle.brasslantern.com> (raw)
In-Reply-To: <kohusvg6jgqkqqtbc5th8h12b61iomo1gr@4ax.com>
On Dec 4, 2:54pm, zzapper wrote:
}
} Why doesn't cd ignore files when you type say "cd fred*" and there
} exists a file frederick.txt and a directory frederick ??
}
} I guess it's becauses the FNG handling fred* doesn't know that it's
} output is to be passed to cd .
Congratulations, you win a no-prize for accurate guessing.
} But can clever zsh be configued to avoid this behaviour.
You could always use a wrapper like this:
function cd {
local -a dirs
dirs=( "${^@}"(-/N) )
if (( $#dirs == 1 ))
then builtin cd $dirs
else builtin cd "$@"
fi
}
However, that might sometimes foil use of the two-argument form of "cd".
next prev parent reply other threads:[~2003-12-04 17:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-04 14:54 zzapper
2003-12-04 15:37 ` Peter Stephenson
2003-12-04 16:47 ` zzapper
2003-12-05 10:54 ` Oliver Kiddle
2003-12-05 11:06 ` zzapper
2003-12-05 14:27 ` Oliver Kiddle
2003-12-04 17:30 ` Bart Schaefer [this message]
2003-12-04 20:50 ` zzapper
2003-12-04 22:56 ` Pavol Juhas
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=1031204173057.ZM17273@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--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).