diff options
author | Jim Pannacciulli <jpannacciulli@mediatemple.net> | 2016-02-20 07:40:18 -0800 |
---|---|---|
committer | Jim Pannacciulli <jpannacciulli@mediatemple.net> | 2016-02-20 07:40:18 -0800 |
commit | 2b5ae4104dc764bf7e254cbb02f397799ddbf957 (patch) | |
tree | 64887c6e57dbb8eba870fd8803de1f607269182e | |
parent | 4f12f450277ddf7a1186ae640961943e10bab33a (diff) | |
download | parssh-2b5ae4104dc764bf7e254cbb02f397799ddbf957.tar.gz parssh-2b5ae4104dc764bf7e254cbb02f397799ddbf957.tar.bz2 |
Save full parssh cmdline including redirections / unexpanded remote commands
-rw-r--r-- | pars.sh | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -104,11 +104,14 @@ parssh () { { [[ "$_parssh_savecmd" == "true" ]] && { + CMDLINE=$(fc -ln -0) + CMDLINE="${CMDLINE#[[:space:]][[:space:]]}" printf "### ###\n" printf "### %s: %s\n"\ date "$(date +%F@%R%z)"\ user "$USER($UID)"\ - pwd "$PWD" + pwd "$PWD"\ + cmdline "$CMDLINE" printf "### BEGIN parssh remote commands ###\n" printf "%s\n### END parssh remote commands ###\n### ###\n"\ "$@" |