On Sun, 5 Jan 2014, Mike Miller wrote:

> Hi,
> 
> I've recently migrated to 2.0.  Below are two issues I'm having.
> 
> First is that many aliases (functions) aren't working anymore because they 
> now 
> need full paths to binaries.  Is this by design?  Other shells (including 
> bash 
> and fish 1.X) don't work like this, they can use aliases of aliases, which 
> keeps 
> them more modularized.  I had to do this on most of them:
> 
> +++ b/.config/fish/functions/fps.fish
> @@ -1,3 +1,3 @@
>   function fps
> -     ps -ef | grep -v grep | grip $argv;
> +     ps -ef | /bin/grep -v grep | /bin/grep -i $argv;
>   end

As long as I run binaries in my path, this still seems to work ok for me. 
Interestingly, `ps` in your example does not require a full path while 
`grep` does. Are you sure about the use of `grip` in your example, or was 
that a typo? Are you defining a `grep` function somewhere (especially 
without using `command grep` or `/bin/grep` inside it)?
 
> Second, something is now wrong with the titles in the tabs of my terminal 
> when I 
> run a program, let's say python.  On a fresh install it seems to work 
> properly, 
> but with my config the title is wrong, instead I get the previous program. 
> $history[0] doesn't work anymore, not sure what to do:
> 
> function fish_title
>      switch $TERM
>          case "xterm*"               # don't try to set title if not in xterm
>              if test $_ = fish
>                  prompt_pwd
>              else
>                  #~ echo $history[0]
>                  echo $history[1]    # shows the previous command line
>              end
>     end
> end

You could try `$_` instead of `$history[1]`, but if you want arguments too 
then you will run into 
https://github.com/fish-shell/fish-shell/issues/334 .

David Adam
zanc...@ucc.gu.uwa.edu.au


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to