Here's a very fishy way to do a fancy prompt, straight from my config.fish 
(last section):
https://gist.github.com/3940401

There's also some example aliases in there.

I don't miss !! or !$ because I've trained my fingers to use C-p (control-P) to 
recall the previous command and Alt+Up to recall the last arg of the last 
command (or do a history search).

Still kind of a pain to do something like this:
$ ls
$ which `!!`

Since the equivalent involves a lot more typing:
$ ls
C-p C-a w h i c h <space> ( C-e )
$ which (ls)

At least in my world needing something like which `!!` is a rarity and the 
alternative isn't awful. 

-- 
Fred Alger
@_phred


On Tuesday, 23 October 2012 at 09:45, charlie wrote:

> One thing I miss from bash world is the ! , short cut for last executed 
> command.
> 
> How would I write a function for something like that ?
> 
> On Tue, Oct 23, 2012 at 2:34 AM, Maxim Gonchar <gma...@gmail.com 
> (mailto:gma...@gmail.com)> wrote:
> > On Tue, 23 Oct 2012 09:22:48 +0400, Philip Ganchev
> > <phil.ganc...@gmail.com (mailto:phil.ganc...@gmail.com)> wrote:
> > 
> > > You need to convert each of the Bash commands in your ~/.bashrc script
> > > to a Fish command, and put it in your fish initialization script.
> > >
> > > Instead of 'export', use 'set -U'. Instead of '[', use 'test'. Instead
> > > of the 'fi' keyword, use the 'end' keyword. Instead of defining
> > > aliases, define functions, using the 'function' built-in. Instead of
> > > 'PS1', use 'PROMPT'.
> > I think it is better to use 'set -x' instead of export in fish.config.
> > Or at least 'set -Ux'.
> > 
> > regards
> > Maxim
> > 
> > ------------------------------------------------------------------------------
> > Everyone hates slow websites. So do we.
> > Make your web apps faster with AppDynamics
> > Download AppDynamics Lite for free today:
> > http://p.sf.net/sfu/appdyn_sfd2d_oct
> > _______________________________________________
> > Fish-users mailing list
> > Fish-users@lists.sourceforge.net (mailto:Fish-users@lists.sourceforge.net)
> > https://lists.sourceforge.net/lists/listinfo/fish-users
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> 
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net (mailto:Fish-users@lists.sourceforge.net)
> https://lists.sourceforge.net/lists/listinfo/fish-users
> 
> 


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to