On 01/06/2014 11:42 PM, David Adam wrote:
>> +++ 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)?

Yes, I have grep and grip (grep -i) functions defined as well.  In 2.0 they 
needed to be modified to use /bin/grep.

All this "just worked" in the past, and I have the same ones defined in bash. 
Most shells (including fish 1.x) allow you to create aliases containing aliases 
which allows them to be stacked in a modular way, e.g.:

alias ls='ls -x -A --si --color=auto --group-directories-first'
alias dir='ls -l'

The second alias dir above now contains the various options from ls without 
having to write them a second time.  The aliases are expanded in a recursive 
loop, stopping I think if asked to expand the same one twice.

> 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 .

Thanks, that's much better than it being wrong.  I wonder why $history[0] was 
removed?

-Mike


------------------------------------------------------------------------------
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