diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2020-10-21 16:57:03 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2020-10-21 16:57:03 -0600 |
commit | 058885f5263f29f046c96ea2ecf55e6dca3ed321 (patch) | |
tree | 5aca868fa5f9d16f39baa0c355f6056b5c8ea4da /plugins/emacs | |
parent | 1774c426de3c4845e2d606c813c37067b8cf78d7 (diff) | |
parent | 3b1699b59527ee8095397b9909a37d55689a0481 (diff) | |
download | zsh-058885f5263f29f046c96ea2ecf55e6dca3ed321.tar.gz zsh-058885f5263f29f046c96ea2ecf55e6dca3ed321.tar.bz2 zsh-058885f5263f29f046c96ea2ecf55e6dca3ed321.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/emacs')
-rw-r--r-- | plugins/emacs/emacs.plugin.zsh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index db0ab13af..0b602d12a 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -26,6 +26,16 @@ if "$ZSH/tools/require_tool.sh" emacsclient 24 2>/dev/null ; then # create a new X frame alias eframe='emacsclient --alternate-editor "" --create-frame' + # Emacs ANSI Term tracking + if [[ -n "$INSIDE_EMACS" ]]; then + chpwd_emacs() { print -P "\033AnSiTc %d"; } + print -P "\033AnSiTc %d" # Track current working directory + print -P "\033AnSiTu %n" # Track username + + # add chpwd hook + autoload -Uz add-zsh-hook + add-zsh-hook chpwd chpwd_emacs + fi # Write to standard output the path to the file # opened in the current buffer. |