diff --git a/client/lib/config.fish b/client/lib/config.fish index e640e5c..1384b56 100644 --- a/client/lib/config.fish +++ b/client/lib/config.fish @@ -6,7 +6,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 (hishtory getTimestamp) - hishtory presaveHistoryEntry fish "$_hishtory_command" $_hishtory_start_time &; disown 2>&1 >/dev/null # Background Run + hishtory presaveHistoryEntry fish "$_hishtory_command" $_hishtory_start_time 2>&1 >/dev/null &; disown # Background Run # hishtory presaveHistoryEntry fish "$_hishtory_command" $_hishtory_start_time 2>&1 >/dev/null # Foreground Run end @@ -19,9 +19,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 &; disown 2>&1 >/dev/null # Background Run + hishtory saveHistoryEntry fish $_hishtory_exit_code "$_hishtory_command" $_hishtory_start_time 2>&1 >/dev/null &; disown # Background Run # hishtory saveHistoryEntry fish $_hishtory_exit_code "$_hishtory_command" $_hishtory_start_time 2>&1 >/dev/null # Foreground Run - hishtory updateLocalDbFromRemote &; disown + hishtory updateLocalDbFromRemote 2>&1 >/dev/null &; 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 diff --git a/client/lib/config.sh b/client/lib/config.sh index 10d8575..8a2dbe4 100644 --- a/client/lib/config.sh +++ b/client/lib/config.sh @@ -56,7 +56,7 @@ function __hishtory_postcommand() { LAST_SAVED_COMMAND=$CMD - (hishtory updateLocalDbFromRemote &) + (hishtory updateLocalDbFromRemote &) 2>&1 >/dev/null return $EXIT_CODE } diff --git a/client/lib/config.zsh b/client/lib/config.zsh index 0dfd379..671f20c 100644 --- a/client/lib/config.zsh +++ b/client/lib/config.zsh @@ -29,7 +29,7 @@ function _hishtory_precmd() { fi (hishtory saveHistoryEntry zsh $_hishtory_exit_code "$_hishtory_command" $_hishtory_start_time &) 2>&1 >/dev/null # Background Run # hishtory saveHistoryEntry zsh $_hishtory_exit_code "$_hishtory_command" $_hishtory_start_time 2>&1 >/dev/null # Foreground Run - (hishtory updateLocalDbFromRemote &) + (hishtory updateLocalDbFromRemote &) 2>&1 >/dev/null } _hishtory_widget() { diff --git a/client/testdata/testUninstall-uninstall-bash b/client/testdata/testUninstall-uninstall-bash index b00069b..ca82d22 100644 --- a/client/testdata/testUninstall-uninstall-bash +++ b/client/testdata/testUninstall-uninstall-bash @@ -1,3 +1,4 @@ Are you sure you want to uninstall hiSHtory and delete all locally saved history data [y/N]Do you have any feedback on why you're uninstallying hiSHtory? Type any feedback and then hit enter. Feedback: Successfully uninstalled hishtory, please restart your terminal... bash: /home/runner/.hishtory/hishtory: No such file or directory +bash: /home/runner/.hishtory/hishtory: No such file or directory diff --git a/client/testdata/testUninstall-uninstall-zsh b/client/testdata/testUninstall-uninstall-zsh index 7a91028..5ffb3e4 100644 --- a/client/testdata/testUninstall-uninstall-zsh +++ b/client/testdata/testUninstall-uninstall-zsh @@ -1,3 +1,4 @@ Are you sure you want to uninstall hiSHtory and delete all locally saved history data [y/N]Do you have any feedback on why you're uninstallying hiSHtory? Type any feedback and then hit enter. Feedback: Successfully uninstalled hishtory, please restart your terminal... _hishtory_precmd:8: command not found: hishtory +_hishtory_precmd:9: command not found: hishtory