mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-24 01:37:27 +08:00
Compare commits
No commits in common. "82c0db41bcfd3fd97d6170dcb7575f98e38fc68d" and "cc5100d1e9e3d843ab93a12a5b0bac71ae0425f3" have entirely different histories.
82c0db41bc
...
cc5100d1e9
16
plugins/term_tab/README
Normal file
16
plugins/term_tab/README
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
term_tab - 'cwd' for all open zsh sessions
|
||||||
|
******************************************
|
||||||
|
|
||||||
|
What it does:
|
||||||
|
*************
|
||||||
|
This plugin allows to complete the 'cwd' of other Zsh sessions. Sounds
|
||||||
|
complicated but is rather simple. E.g. if you have three zsh sessions open, in
|
||||||
|
each session you are in a different folder, you can hit Ctrl+v in one session
|
||||||
|
to show you the current working directory of the other open zsh sessions.
|
||||||
|
|
||||||
|
How it works:
|
||||||
|
*************
|
||||||
|
* It uses 'pidof zsh' to determine all zsh PIDs
|
||||||
|
* It reads procfs to get the current working directory of this session
|
||||||
|
* Everything is fed into zsh's completion magic
|
||||||
@ -1,16 +0,0 @@
|
|||||||
# term_tab plugin
|
|
||||||
|
|
||||||
term_tab - `cwd` for all open zsh sessions
|
|
||||||
|
|
||||||
## What it does:
|
|
||||||
|
|
||||||
This plugin allows to complete the `cwd` of other Zsh sessions. Sounds
|
|
||||||
complicated but is rather simple. E.g. if you have three zsh sessions open, in
|
|
||||||
each session you are in a different folder, you can hit `Ctrl+V` in one session
|
|
||||||
to show you the current working directory of the other open zsh sessions.
|
|
||||||
|
|
||||||
## How it works:
|
|
||||||
|
|
||||||
* It uses `pidof zsh` to determine all zsh PIDs
|
|
||||||
* It reads procfs to get the current working directory of this session
|
|
||||||
* Everything is fed into zsh's completion magic
|
|
||||||
@ -116,17 +116,6 @@ prompt_git() {
|
|||||||
prompt_segment green $CURRENT_FG
|
prompt_segment green $CURRENT_FG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local ahead behind
|
|
||||||
ahead=$(git log --oneline @{upstream}.. 2>/dev/null)
|
|
||||||
behind=$(git log --oneline ..@{upstream} 2>/dev/null)
|
|
||||||
if [[ -n "$ahead" ]] && [[ -n "$behind" ]]; then
|
|
||||||
PL_BRANCH_CHAR=$'\u21c5'
|
|
||||||
elif [[ -n "$ahead" ]]; then
|
|
||||||
PL_BRANCH_CHAR=$'\u21b1'
|
|
||||||
elif [[ -n "$behind" ]]; then
|
|
||||||
PL_BRANCH_CHAR=$'\u21b0'
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
|
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
|
||||||
mode=" <B>"
|
mode=" <B>"
|
||||||
elif [[ -e "${repo_path}/MERGE_HEAD" ]]; then
|
elif [[ -e "${repo_path}/MERGE_HEAD" ]]; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user