aboutsummaryrefslogtreecommitdiff
path: root/sdn-install
diff options
context:
space:
mode:
Diffstat (limited to 'sdn-install')
-rwxr-xr-xsdn-install6
1 files changed, 5 insertions, 1 deletions
diff --git a/sdn-install b/sdn-install
index 93821bf..788c8bf 100755
--- a/sdn-install
+++ b/sdn-install
@@ -16,6 +16,9 @@ sdn-navigate () {
# helpers after the terminal has been resized while running sdn
command true
+ # Add to history, see https://www.zsh.org/mla/workers/2020/msg00633.html
+ fc -R =(print -- "$helper")
+
/bin/sh -c "$helper" </dev/tty || break
done
# optionally: zle zle-line-init
@@ -51,6 +54,7 @@ sdn-navigate () {
((SDN_P=SDN_P+${#insert}+1))
}
[[ -z $helper ]] && break
+ history -s -- "$helper"
/bin/sh -c "$helper" || break
done
}
@@ -121,7 +125,7 @@ done
# Figure out the shell to integrate with
login=$(basename "$SHELL")
-actual=$(ps -p $$ -o ppid= | xargs ps -o comm= -p)
+actual=$(ps -p $$ -o ppid= | xargs ps -o comm= -p | sed 's/^-//')
if [ -z "$shell" ]
then
if [ "$login" != "$actual" ]