]> Frank Brehm's Git Trees - config/bruni/etc.git/commitdiff
saving uncommitted changes in /etc prior to emerge run
authorFrank Brehm <frank@brehm-online.com>
Thu, 18 Jan 2018 16:38:38 +0000 (17:38 +0100)
committerFrank Brehm <root@bruni.home.brehm-online.com>
Thu, 18 Jan 2018 16:38:38 +0000 (17:38 +0100)
profile.d/vte-2.91.sh

index 2d211caa2f1795cbfaf7bb7f7b7a07c32e80a419..1c0543bd9d26ff8f0e9795f328cee0234d77a398 100644 (file)
@@ -50,9 +50,11 @@ __vte_osc7 () {
 }
 
 __vte_prompt_command() {
+  local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//')
+  command="${command//;/ }"
   local pwd='~'
   [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/}
-  printf "\033]0;%s@%s:%s\007%s" "${USER}" "${HOSTNAME%%.*}" "${pwd}" "$(__vte_osc7)"
+  printf "\033]777;notify;Command completed;%s\007\033]0;%s@%s:%s\007%s" "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" "$(__vte_osc7)"
 }
 
 case "$TERM" in