Skip to content
This repository has been archived by the owner on Apr 30, 2020. It is now read-only.

How to remove the white space when in a no-git directory #64

Open
dss886 opened this issue Mar 27, 2017 · 0 comments
Open

How to remove the white space when in a no-git directory #64

dss886 opened this issue Mar 27, 2017 · 0 comments

Comments

@dss886
Copy link

dss886 commented Mar 27, 2017

When I am in a directory which is not a git repository, there is an white space shown at the end of the prompt.

image

I've tried to uncomment the if-statement in line 109 to line 128, not work.

Also tried the ternary expression as this article:

POWERLINE_GIT_INFO_LEFT=$(("$(git_prompt_info)"=""?1:0))

But end up with : zsh: bad math expression: illegal character: "

My temporary solution is add below lines to my ~/.zshrc:

function newCD(){
	cd $1;
	source "$ZSH/themes/$ZSH_THEME.zsh-theme"
}
alias cd="newCD"

But it seems to so ugly and unstable as I changed the behavior of the default command "cd", so does anyone have a better solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant