help / color / mirror / code / Atom feed
From: zzapper <zsh@rayninfo.co.uk>
To: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: Is the ~ really superfluous in a cd ~- type command?
Date: Wed, 16 Mar 2022 16:06:09 +0000	[thread overview]
Message-ID: <5e1b8172-c51a-d2eb-230b-338919369e0e@rayninfo.co.uk> (raw)
In-Reply-To: <CAHYJk3SpCYBXjJHw9xw7cEvZn5SsJqFhy0fH_+7VAy-KprCSFw@mail.gmail.com>

On 16/03/2022 15:51, Mikael Magnusson wrote:
> On 3/16/22, zzapper <zsh@rayninfo.co.uk> wrote:
>> Hi
>> cd - or cd ~-
>> cd -1 or cd ~-1
>> seem to do the same thing
> Yes, cd handles -num itself, but for other commands you need the expansion.
ahh! yes with cd -num you can cd successfully but you DON'T get tab 

So there's a great benefit to using tilda

cd ~4<tab>

cd /aaa/<tab>

cd aaa/sub etc

# if you want a quirk

~ on its own takes you to your home directory If you've got 'setopt autocd'


      reply	other threads:[~2022-03-16 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16  9:29 zzapper
2022-03-16 15:51 ` Mikael Magnusson
2022-03-16 16:06   ` zzapper [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e1b8172-c51a-d2eb-230b-338919369e0e@rayninfo.co.uk \
    --to=zsh@rayninfo.co.uk \
    --cc=zsh-users@zsh.org \
    --subject='Re: Is the ~ really superfluous in a cd ~- type command?' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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).