Hi Peter,
There's support for this in trunk, but not the fish 2.1 release. What you're
looking for is the fish_preexec event.
Example:
function myfunc --on-event fish_preexec
echo Command: $argv
end
The PR was https://github.com/fish-shell/fish-shell/pull/1666
<https://github.com/fish-shell/fish-shell/pull/1666>
Hope that helps,
_fish
> On Nov 24, 2014, at 2:57 PM, Peter Kerpedjiev <pkerpedj...@gmail.com> wrote:
>
> Dear Mailing List,
>
> Is there a way for me to write some handler that will pass every command
> as a string argument to another script?
>
> For example, if I have the following command that I'm about to run:
>
> prompt> ls -a > out.txt
>
> What I'd like to do is write an event handler that takes the command
> entered at the prompt (ls -a > out.txt) and passes it as a parameter to
> some other script:
>
> my_script 'ls -a > out.txt'
>
> Is this in any way possible with fish?
>
> All the best,
>
> -Peter
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users