zsh-users
 help / color / mirror / code / Atom feed
* Safety check before expanding globs?
@ 2011-07-29 22:41 Richard Hartmann
  2011-07-30 10:40 ` Jérémie Roquet
  2011-07-30 12:28 ` Mikael Magnusson
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Hartmann @ 2011-07-29 22:41 UTC (permalink / raw)
  To: zsh-users

Hi all,

I regularly use

 quux /foo/bar/*<tab>

to expand all files, do some modifications and then hit enter. Is
there any way to have zsh ask for confirmation (or require two tabs)
before expanding said list? Alternatively, is there a way to undo the
expansion?


Thanks,
Richard


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

* Re: Safety check before expanding globs?
  2011-07-29 22:41 Safety check before expanding globs? Richard Hartmann
@ 2011-07-30 10:40 ` Jérémie Roquet
  2011-07-30 12:28 ` Mikael Magnusson
  1 sibling, 0 replies; 4+ messages in thread
From: Jérémie Roquet @ 2011-07-30 10:40 UTC (permalink / raw)
  To: zsh-users; +Cc: Richard Hartmann

Hi Richard,

2011/7/30 Richard Hartmann <richih.mailinglist@gmail.com>:
> I regularly use
>
>  quux /foo/bar/*<tab>
>
> to expand all files, do some modifications and then hit enter. Is
> there any way to have zsh ask for confirmation (or require two tabs)
> before expanding said list?

Just wondering… why would you hit “tab” if it's not for expansion?

> Alternatively, is there a way to undo the expansion?

Yes, the “undo” function can do that. It's bound to ctrl+_ by default,
with emacs-like key bindings.

Best regards,

-- 
Jérémie


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

* Re: Safety check before expanding globs?
  2011-07-29 22:41 Safety check before expanding globs? Richard Hartmann
  2011-07-30 10:40 ` Jérémie Roquet
@ 2011-07-30 12:28 ` Mikael Magnusson
  2011-07-30 12:42   ` Frank Terbeck
  1 sibling, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2011-07-30 12:28 UTC (permalink / raw)
  To: Richard Hartmann; +Cc: zsh-users

On 30 July 2011 00:41, Richard Hartmann <richih.mailinglist@gmail.com> wrote:
> Hi all,
>
> I regularly use
>
>  quux /foo/bar/*<tab>
>
> to expand all files, do some modifications and then hit enter. Is
> there any way to have zsh ask for confirmation (or require two tabs)
> before expanding said list? Alternatively, is there a way to undo the
> expansion?

You might like the list-expand binding. Contrary to the name it
doesn't expand anything, it just lists the result of a glob below the
prompt.

-- 
Mikael Magnusson


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

* Re: Safety check before expanding globs?
  2011-07-30 12:28 ` Mikael Magnusson
@ 2011-07-30 12:42   ` Frank Terbeck
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Terbeck @ 2011-07-30 12:42 UTC (permalink / raw)
  To: zsh-users

Mikael Magnusson wrote:
> On 30 July 2011 00:41, Richard Hartmann <richih.mailinglist@gmail.com> wrote:
[...]
>>  quux /foo/bar/*<tab>
[...]
> You might like the list-expand binding. Contrary to the name it
> doesn't expand anything, it just lists the result of a glob below the
> prompt.

The `_expand' completer is quite useful too. See "man zshcompsys" on
that function for details.

Regards, Frank


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

end of thread, other threads:[~2011-07-30 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-29 22:41 Safety check before expanding globs? Richard Hartmann
2011-07-30 10:40 ` Jérémie Roquet
2011-07-30 12:28 ` Mikael Magnusson
2011-07-30 12:42   ` Frank Terbeck

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