On 2019-09-07 16:11, Greg Reagle wrote: > Hi. I'd like to help, but I don't understand your goal. Please elaborate.
Sure. I want to be able to call other command on the command failure: > my_command || call_error_handler where the error handler could be curl to https://healthchecks.io/ However, I still want to have the error code (from my_command) returned by the whole expression (by default there is "0" as call_error_handler finishes successfully). However, I cannot call "exit -1" as it exists Fish itself. Would like to have any specific part explained? Marcin > > On Sat, Sep 7, 2019, at 06:20, Marcin Zajączkowski wrote: >> Hi. I would like to have my command send notification about failure and >> keep/propagate the original error code. >> >> I was thinking about something like: >>> my_command || call_error_handler and exit -1 >> or >>> my_command || begin call_error_handler; exit -1; end >> >> to have at least a command marked as failed (with -1). However, it exits >> the whole Fish. >> >> How can I do it? >> >> Marcin >> >> P.S. In the top-notch edition it could also extended to memorize the >> original $status in a variable and return is at the end. _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users