franciscolourenco / done

A fish-shell package to automatically receive notifications when long processes finish.
MIT License
779 stars 71 forks source link

Source fish file option? #52

Closed unai-ndz closed 5 years ago

unai-ndz commented 5 years ago

__done_notification_command is good enough for simple things but the escaping needed can get really bad for complex commands.

What do you think about testing if __fish_config_dir/conf.d/done_command.fish exists and sourcing it in case it does?

I'm up to making a PR. I actually have my done.fish edited in this way already.

franciscolourenco commented 5 years ago

@unai-ndz can't you set the command option to execute a script or source your file?

set -u __done_notification_command "source __fish_config_dir/conf.d/done_command.fish"
unai-ndz commented 5 years ago

You are right, I did try that before and it didn't quite work so i thought the eval was messing things up but i have tried again and it's working. Must have been something else. Thanks for the tip.