I'd like to always run a fish script in the background even if the user doesn't specify that.In bash, this can be done by surrounding the script with ( at the start and ) & at the end.Is there anyway for a fish script to run itself in the background?
Run fish script in background?
fish
fish does not fork to execute subshells, so it is not yet possible to run fish script in the background - see https://github.com/fish-shell/fish-shell/issues/563A hackish workaround is to invoke fish again, like so:#!/usr/local/bin/fishfish -c 'sleep 5 ; echo done' &