Skip to content

Instantly share code, notes, and snippets.

@Trucido
Created May 20, 2018 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trucido/db824b06024b6205b0f20a712df5eafd to your computer and use it in GitHub Desktop.
Save Trucido/db824b06024b6205b0f20a712df5eafd to your computer and use it in GitHub Desktop.
--- 1/etc/profile.d/vte.sh 2018-04-19 16:46:08.000000000 -0400
+++ 2/etc/profile.d/vte.sh 2018-05-17 15:08:01.808845123 -0400
@@ -50,9 +50,11 @@
}
__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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment