diff --git a/scripts/hooks.sh b/scripts/hooks.sh index 7798699..20f5935 100644 --- a/scripts/hooks.sh +++ b/scripts/hooks.sh @@ -16,7 +16,7 @@ __resh_preexec() { __resh_collect --cmdLine "$__RESH_CMDLINE" \ --recall-actions "$__RESH_HIST_RECALL_ACTIONS" \ --recall-strategy "$__RESH_HIST_RECALL_STRATEGY" \ - &>~/.resh/collect_last_run_out.txt || echo "resh-collect ERROR: $(head -n 1 ~/.resh/collect_last_run_out.txt)" + > ~/.resh/collect_last_run_out.txt 2>&1 || echo "resh-collect ERROR: $(head -n 1 ~/.resh/collect_last_run_out.txt)" } # used for collect and collect --recall @@ -156,7 +156,7 @@ __resh_precmd() { -gitRemoteExitCodeAfter "$__RESH_GIT_REMOTE_EXIT_CODE_AFTER" \ -realtimeAfter "$__RESH_RT_AFTER" \ -timezoneAfter "$__RESH_TZ_AFTER" \ - &>~/.resh/postcollect_last_run_out.txt || echo "resh-postcollect ERROR: $(head -n 1 ~/.resh/postcollect_last_run_out.txt)" + > ~/.resh/postcollect_last_run_out.txt 2>&1 || echo "resh-postcollect ERROR: $(head -n 1 ~/.resh/postcollect_last_run_out.txt)" fi __resh_reset_variables fi diff --git a/scripts/install.sh b/scripts/install.sh index 413edf7..92f9d8d 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -42,7 +42,7 @@ else fi -if ! zsh --version &>/dev/null; then +if ! zsh --version >/dev/null 2>&1; then echo " * Zsh version: ? - not installed!" else zsh_version=$(zsh -c 'echo ${ZSH_VERSION}') @@ -135,7 +135,7 @@ if [ -f ~/.resh/resh.pid ]; then else pkill -SIGTERM "resh-daemon" || true fi -nohup resh-daemon &>/dev/null & disown +nohup resh-daemon >/dev/null 2>&1 & disown # Generating resh-uuid ... [ -e ~/.resh/resh-uuid ] \ diff --git a/scripts/util.sh b/scripts/util.sh index 23e365b..2eabfce 100644 --- a/scripts/util.sh +++ b/scripts/util.sh @@ -43,7 +43,7 @@ __resh_run_daemon() { if [ -n "$ZSH_VERSION" ]; then setopt LOCAL_OPTIONS NO_NOTIFY NO_MONITOR fi - nohup resh-daemon &>~/.resh/daemon_last_run_out.txt & disown + nohup resh-daemon >~/.resh/daemon_last_run_out.txt 2>&1 & disown } __resh_bash_completion_init() { @@ -142,6 +142,6 @@ __resh_session_init() { -osReleaseIdLike "$__RESH_OS_RELEASE_ID_LIKE" \ -osReleaseName "$__RESH_OS_RELEASE_NAME" \ -osReleasePrettyName "$__RESH_OS_RELEASE_PRETTY_NAME" \ - &>~/.resh/session_init_last_run_out.txt || echo "resh-session-init ERROR: $(head -n 1 ~/.resh/session_init_last_run_out.txt)" + > ~/.resh/session_init_last_run_out.txt 2>&1 || echo "resh-session-init ERROR: $(head -n 1 ~/.resh/session_init_last_run_out.txt)" fi }