mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-12 20:21:02 +01:00
Add check for git and bzr to agnoster theme
Plugin command-not-found on Arch Linux returns 0 if git or bzr is found in repos, hence outputting unwanted pkgfile output. Checking if the commands exist first fixes all such issues.
This commit is contained in:
parent
f39dcfda8d
commit
7e5483d672
1 changed files with 2 additions and 1 deletions
|
@ -86,7 +86,7 @@ prompt_context() {
|
||||||
|
|
||||||
# Git: branch/detached head, dirty status
|
# Git: branch/detached head, dirty status
|
||||||
prompt_git() {
|
prompt_git() {
|
||||||
|
(( $+commands[git] )) || return
|
||||||
local PL_BRANCH_CHAR
|
local PL_BRANCH_CHAR
|
||||||
() {
|
() {
|
||||||
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
|
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
|
||||||
|
@ -128,6 +128,7 @@ prompt_git() {
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt_bzr() {
|
prompt_bzr() {
|
||||||
|
(( $+commands[bzr] )) || return
|
||||||
if (bzr status >/dev/null 2>&1); then
|
if (bzr status >/dev/null 2>&1); then
|
||||||
status_mod=`bzr status | head -n1 | grep "modified" | wc -m`
|
status_mod=`bzr status | head -n1 | grep "modified" | wc -m`
|
||||||
status_all=`bzr status | head -n1 | wc -m`
|
status_all=`bzr status | head -n1 | wc -m`
|
||||||
|
|
Loading…
Reference in a new issue