From 3ca9de559f9504acda7401ee802a3dd4a1a43aaa Mon Sep 17 00:00:00 2001 From: David Dworken Date: Fri, 20 Oct 2023 23:23:24 -0700 Subject: [PATCH] Fix #117 by disown-ing background processes so that they don't stop fish from exiting --- client/lib/config.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/lib/config.fish b/client/lib/config.fish index 8f8e14c..63070ed 100644 --- a/client/lib/config.fish +++ b/client/lib/config.fish @@ -2,7 +2,7 @@ function _hishtory_post_exec --on-event fish_preexec # Runs after , but before the command is executed set --global _hishtory_command $argv set --global _hishtory_start_time (date +%s%N) - hishtory presaveHistoryEntry fish "$_hishtory_command" $_hishtory_start_time & # Background Run + hishtory presaveHistoryEntry fish "$_hishtory_command" $_hishtory_start_time &; disown # Background Run # hishtory presaveHistoryEntry fish "$_hishtory_command" $_hishtory_start_time # Foreground Run end @@ -15,9 +15,9 @@ function __hishtory_on_prompt --on-event fish_prompt if [ -n "$_hishtory_first_prompt" ] set --global -e _hishtory_first_prompt else if [ -n "$_hishtory_command" ] - hishtory saveHistoryEntry fish $_hishtory_exit_code "$_hishtory_command" $_hishtory_start_time & # Background Run + hishtory saveHistoryEntry fish $_hishtory_exit_code "$_hishtory_command" $_hishtory_start_time &; disown # Background Run # hishtory saveHistoryEntry fish $_hishtory_exit_code "$_hishtory_command" $_hishtory_start_time # Foreground Run - hishtory updateLocalDbFromRemote & + hishtory updateLocalDbFromRemote &; disown set --global -e _hishtory_command # Unset _hishtory_command so we don't double-save entries when fish_prompt is invoked but fish_postexec isn't end end