Skip to content

Instantly share code, notes, and snippets.

@pirate
Created May 20, 2017 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pirate/01dac89a8db3d79e970365a1f031732f to your computer and use it in GitHub Desktop.
Save pirate/01dac89a8db3d79e970365a1f031732f to your computer and use it in GitHub Desktop.
Fork a fish command using a bash subshell
#!/bin/bash
/usr/local/bin/fish -c "$*" > ~/tmp/fish_forks/last.log 2>&1 &
pid=$!
mv ~/tmp/fish_forks/last.log ~/tmp/fish_forks/$pid.log
disown $pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment