I'm not at my computer, but you can use the history variable.
$ my_command $history[0]
I have not done this myself, so I can't remember if you should use
$history[1] instead. Not sure when the current command gets pushed into the
array.
On Tue, May 28, 2013 at 11:31 AM, Yvon Thoraval <yvon.thora...@gmail.com>wrote:
> before switching to fish, from zsh, I've used a command like :
> $ my_command "!!"
>
> the "!!" being translated to last command line (as up key).
>
> is there a way to get last command line as argument of the current command
> line ?
>
> --
> Yvon@48.871651804,2.384858688
>
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users