Axel Liljencrantz wrote:
> The long term solution is to extend the fish event delivery
> framework. A future version of fish might have something like this in
> the cd shellscript:
> 
> event --send --name change_directory
> 
> which can be caught by
> 
> function cd_list_handler --on-event change_directory
>     ...
> end

Fine, as long as this is not required from the user:

function cd_list_handler --on-event change_directory
    if status --is-command-substitution
        return
    end
    ...
end

And change_directory should be clearly defined as "user invoked cd". So that
if cd_list_handler calls cd, it should not get recursive.

> 
> Or, even better, it should be possible to attach events to a command,
> so that you can specify that a handeler should be run after a
> specific command has been run. Somthing like:
> 
> function cd_list_handelr --on_after command cd
>     ...
> end
> 
> I'm trying to introduce the event syntax one step at a time, but this
> kind of generic event passing has always been part of the plan for
> the event framework.
> 

Great. I look forward to it.



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to