Thursday, May 27, 2010

Re: include prompt when executing a shell command

Hej,

this is not a particularly nice solution, but depending on what you're
actually doing it might suffice. :)

:command -nargs=1 Read :read bash -c 'echo "`whoami`@`hostname`:`pwd` \$ "; <args>'

Instead of the ":read..." you could also just call a function and do
something more elaborate there.

See
:help command
:help function
:help functions

Regards,
Kai.

PS:
> : read !cat hola
Didn't know that, made my day :)

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: