Skip to content

Commit

Permalink
fix stash function to work when sourced
Browse files Browse the repository at this point in the history
  • Loading branch information
thepeterstone committed Apr 30, 2014
1 parent a715464 commit 0ae27d5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bin/zsh/rc-functions
Original file line number Diff line number Diff line change
Expand Up @@ -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 -"
}
Expand Down

0 comments on commit 0ae27d5

Please sign in to comment.