aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe2017-06-11 11:53:00 +0200
committerGiuseppe2017-06-11 11:53:00 +0200
commitf0492e03668b1d8d7e405b03b4234ad9c3806901 (patch)
tree5dfb15babe3d249cfa12bbfc7b47d8cb33685fde
parent9acc4ddb93df4bceb18a3f9dc47e679d7f4ee5dd (diff)
downloadaur-f0492e03668b1d8d7e405b03b4234ad9c3806901.tar.gz
Allow multiple resources without breaking the shell
-rw-r--r--preexec.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/preexec.sh b/preexec.sh
index a96ef1195dcf..720c0bcf5717 100644
--- a/preexec.sh
+++ b/preexec.sh
@@ -15,5 +15,5 @@ _preexec() {
NWD_FOCUSED_W=$(python3 /usr/share/nwd/focused_window.py)
}
-preexec_functions+=(_preexec)
-precmd_functions+=(_precmd)
+if [[ -z $(echo $preexec_functions|grep _preexec) ]]; then preexec_functions+=(_preexec); fi
+if [[ -z $(echo $precmd_functions|grep _precmd) ]]; then precmd_functions+=(_precmd); fi