[tmux] Add git diff switching staged to dot session
The git log display will now depend on current staged status. If no files have been staged, the panel will display recent git logs with branches and short titles, as before. If files have been staged however, the panel will switch to display staged changes however. This is to facilitate a better overview of changes during the staging and committing process; since often one wants to see the staged changes next to the commit that is being written.
This commit is contained in:
parent
11a6eda0ce
commit
7895b1c052
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ split-window -h watch -t -n 1 -c 'cd ~/.dotfiles; git -c color.ui=always status
|
|||
split-window -v
|
||||
send-keys "cd ~/.dotfiles; clear" C-m L C-m
|
||||
select-pane -t 1
|
||||
split-window -v watch -t -n 1 -c 'cd ~/.dotfiles; git -c color.ui=always log --graph --date=short --decorate --oneline --all --remotes'
|
||||
split-window -v watch -t -n 1 -c 'cd ~/.dotfiles; [ $(git diff --staged | wc -l) -eq 0 ] && git -c color.ui=always log --graph --date=short --decorate --oneline --all --remotes || git -c color.ui=always diff --staged | tail -n $(($LINES - 2))'
|
||||
select-pane -t 4
|
||||
new-window -n code
|
||||
send-keys "cd ~/.dotfiles; v ." C-m I
|
||||
|
|
Loading…
Reference in a new issue