4 ms·
I ended up implementing my own background process management for fish here, it uses bash to fork a subshell with fish inside of it, which seems to solve all the
by nikisweeting 6y ago
I ended up implementing my own background process management for fish here, it uses bash to fork a subshell with fish inside of it, which seems to solve all the problems I encountered.
https://github.com/pirate/fish-functions/blob/master/background.fish https://github.com/pirate/fish-functions/blob/master/backgro...
https://github.com/pirate/fish-functions/blob/master/progress_await.fish https://github.com/pirate/fish-functions/blob/master/progres...
https://github.com/pirate/fish-functions/blob/master/signal.fish https://github.com/pirate/fish-functions/blob/master/signal....
https://github.com/pirate/fish-functions/blob/master/fork https://github.com/pirate/fish-functions/blob/master/fork
Usage:
background progress_await compiling_task_finished
g++ ... some slow command
signal compiling_task_finished
This allows the progress bar to truly run at the same time as the g++ command and receive a signal from the fg process when it's time to complete, something a simple & does not let you do in fish.
I've collected more details on Fish's issues here for anyone interested:
https://github.com/pirate/fish-functions#issues-with-fish https://github.com/pirate/fish-functions#issues-with-fish
- mattgreenrocks 6y agoI like your semaphore idea a lot! Might be a good primitive to put in fish.