From 0ae27d5951202bb9b8a0a35dfc220276c723ad24 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Wed, 30 Apr 2014 11:47:42 -0700 Subject: [PATCH] fix stash function to work when sourced --- bin/zsh/rc-functions | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/zsh/rc-functions b/bin/zsh/rc-functions index f863c7a..819102c 100755 --- a/bin/zsh/rc-functions +++ b/bin/zsh/rc-functions @@ -50,9 +50,8 @@ stash() { if [ ''="$HOME_HOST" ]; then echo 'Set $HOME_HOST (and set up ~/.ssh/config accordingly) and try again.' - exit 1 fi - COMMAND=`builtin history -1 | awk '{ $1=""; print $0 }'`; + COMMAND=`builtin history -1 | awk '{ $1=""; print }'`; DESTFILE='docroot/s/history'; echo "$COMMAND # $@" | ssh -t $SSH_HOST "cat >>$DESTFILE -" }