diff options
Diffstat (limited to '.bashrc')
| -rw-r--r-- | .bashrc | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -221,8 +221,12 @@ export PROMPT_COMMAND="shell_var_fix;" bind "set vi-ins-mode-string \"$(left_cap)i$(right_cap)\"" bind "set vi-cmd-mode-string \"$(left_cap $PS_WARN)n$(right_cap $PS_WARN)\"" + # Thanks https://stackoverflow.com/a/13773343 + set_tab_title() { + printf '\e]2;%s\a' "$*" + } # Huge thanks to: https://lists.gnu.org/archive/html/help-bash/2022-02/msg00023.html - bind -x "\"\xC0\a\":printf \"$(left_cap $PS_DBG)%(%T)T$(right_cap $PS_DBG)\"" + bind -x "\"\xC0\a\":set_tab_title \"\$READLINE_LINE\";printf \"$(left_cap $PS_DBG)%(%T)T$(right_cap $PS_DBG)\"" bind '"\xC0\r":accept-line' bind '"\r":"\xC0\a\xC0\r"' # }}} |
