aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pars.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/pars.sh b/pars.sh
index a749335..91b1022 100644
--- a/pars.sh
+++ b/pars.sh
@@ -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"\
"$@"