[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: dired-do-shell-command needs minibuffer completion

From: Drew Adams
Subject: RE: dired-do-shell-command needs minibuffer completion
Date: Fri, 11 Apr 2008 09:22:16 -0700

> From: address@hidden Sent: Sunday, April 06, 2008 6:45 PM
> ! runs the command dired-do-shell-command
> Well, it could certainly use the same completion list for command
> names as comint-dynamic-complete. Currently TAB at its prompt just
> does self-insert-command.

What you want is to be able to complete against the history of shell commands
used in Dired, `dired-shell-command-history': to reuse a previous command,
possibly editing it first. Right?

That's easy to do, and it need not be limited to shell commands or Dired.

With Icicles, you can, during any minibuffer input, use `M-o' to complete
against the current history. In this case, the history is
`dired-shell-command-history', so you complete against shell commands previously
used for `!' in Dired. This comes for free; it's not something designed
specifically for shell invocation in Dired.

If you want to do the same thing without Icicles, it's not hard. See command
`icicle-insert-history-element', which is bound to `M-o' in all minibuffer
keymaps. It uses a recursive minibuffer, passing `minibuffer-history-variable'
to `completing-read' as the completion alist.

I proposed this feature for Emacs, but who knows what will come of that. See my
March 15 and 16 mails to the thread "Usability suggestion : completion for M-:"
on address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]