zsh-users
 help / color / mirror / code / Atom feed
* completing ~-
@ 2022-03-21  8:38 zzapper
  2022-03-21  8:44 ` Roman Perepelitsa
  0 siblings, 1 reply; 2+ messages in thread
From: zzapper @ 2022-03-21  8:38 UTC (permalink / raw)
  To: Zsh-Users List

Hi

cd ~-2/<tab>

# then i select subdir 'aaa'

cd ~-2/aaa/<tab>  ## etc


But it would be cute sometimes? for the tab to replace the ~-2/ with the 
actual '/home/david/Pictures/'

is that possible/desirable?

zzapper



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: completing ~-
  2022-03-21  8:38 completing ~- zzapper
@ 2022-03-21  8:44 ` Roman Perepelitsa
  0 siblings, 0 replies; 2+ messages in thread
From: Roman Perepelitsa @ 2022-03-21  8:44 UTC (permalink / raw)
  To: zzapper; +Cc: Zsh-Users List

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.

Roman.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-21  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21  8:38 completing ~- zzapper
2022-03-21  8:44 ` Roman Perepelitsa

Code repositories for project(s) associated with this 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).