help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: zzapper <zsh@rayninfo.co.uk>
Cc: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: completing ~-
Date: Mon, 21 Mar 2022 09:44:22 +0100	[thread overview]
Message-ID: <CAN=4vMqkXUq9BjEkxVDMTTG5n6gUgPCEYy9WOvXSzaotDKVg7A@mail.gmail.com> (raw)
In-Reply-To: <49b0a00e-ae43-e2cd-e332-a82e2512eb99@rayninfo.co.uk>

On Mon, Mar 21, 2022 at 9:39 AM zzapper <zsh@rayninfo.co.uk> wrote:
> But it would be cute sometimes? for the tab to replace the ~-2/ with the
> actual '/home/david/Pictures/'

I use this:

  my-expand() zle _expand_alias || zle .expand-word || :

  bindkey '^ ' my-expand

This allows me to expand stuff like ~2 and **/*.orig with Ctrl-Space.
I often use it to expand globs to verify them and then undo the
expansion with Ctrl-/ before executing the command. Undo is there so
that my history contains the unexpanded glob in case I want to reuse
it in the future.


      reply	other threads:[~2022-03-21  8:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21  8:38 zzapper
2022-03-21  8:44 ` Roman Perepelitsa [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='CAN=4vMqkXUq9BjEkxVDMTTG5n6gUgPCEYy9WOvXSzaotDKVg7A@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=zsh-users@zsh.org \
    --cc=zsh@rayninfo.co.uk \
    --subject='Re: completing ~-' \


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