1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-10-16 11:40:46 +00:00

Compare commits

...

3 commits

Author SHA1 Message Date
Latif Sulistyo
082879c989
Merge b053f89de0 into 367e9381df 2024-09-23 17:52:46 +02:00
Carlo Sala
367e9381df
chore(git): fix typo 2024-09-23 17:32:44 +02:00
Latif Sulistyo
b053f89de0 feat(lib): support for tmux pane title 2022-09-05 08:33:01 +07:00
2 changed files with 3 additions and 2 deletions

View file

@ -163,7 +163,7 @@ function git_current_branch() {
} }
# Outputs the name of the previously checked out branch # Outputs the name of the previously checked out branch
# Usage example: git pull origin $(git_current_branch) # Usage example: git pull origin $(git_previous_branch)
# rev-parse --symbolic-full-name @{-1} only prints if it is a branch # rev-parse --symbolic-full-name @{-1} only prints if it is a branch
function git_previous_branch() { function git_previous_branch() {
local ref local ref

View file

@ -22,7 +22,8 @@ function title {
print -Pn "\e]1;${1:q}\a" # set tab name print -Pn "\e]1;${1:q}\a" # set tab name
;; ;;
screen*|tmux*) screen*|tmux*)
print -Pn "\ek${1:q}\e\\" # set screen hardstatus print -Pn "\e]2;${2:q}\e\\" # set tmux pane title
print -Pn "\ek${1:q}\e\\" # set screen hardstatus/tmux window name if `allow-rename` is on
;; ;;
*) *)
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then