I think this should be possible by rebinding "\n". If you look at the output of 
"bind", you'll see this line:

bind \n execute

I haven't tried it, but I think you should be able to re-bind \n to a custom 
function and do whatever you want there.

--Diego


> On Nov 24, 2014, at 4: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

Reply via email to