zsh-users
 help / color / mirror / code / Atom feed
From: zzapper <david@tvis.co.uk>
To: zsh-users@sunsite.dk
Subject: Re: Why doesn't cd ignore files when you type say "cd fred*"
Date: Thu, 04 Dec 2003 16:47:36 +0000	[thread overview]
Message-ID: <k2pusvsfg64p2070t8iplb9l1ckp4t52du@4ax.com> (raw)
In-Reply-To: <4222.1070552274@csr.com>

On Thu, 04 Dec 2003 15:37:54 +0000, Peter Stephenson <pws@csr.com>
wrote:

>Use a wrapper.  It's not 100% accurate in guessing what form of cd you
>are using, but it will work the vast majority of the time.
>
>cd() {
>  local -a dirs
>  local d
>  for d in $*; do
>    [[ -d $d ]] && dirs=($dirs $d)
>  done
>  if (( ${#dirs} == 1 )); then
>    builtin cd $dirs
>  else
>    # Assume it's something like e.g. `cd SOURCE REPLACE'
>    builtin cd "$@"
>  fi
>}

Yes tasty! ( I've called this cdd and left the builtin cd alone). (is
the keyword function optional?)

But are there any solutions using COMPCTRL?

zzapper
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


  reply	other threads:[~2003-12-04 16:48 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 [this message]
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
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=k2pusvsfg64p2070t8iplb9l1ckp4t52du@4ax.com \
    --to=david@tvis.co.uk \
    --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).