Comments (8)
You can also fix it by using single quotes, so the variables and commands in PROMPT don't get evaluated when sourcing .zshrc. See here: http://unix.stackexchange.com/questions/14266/how-do-you-make-rprompt-in-zsh-update-itself-on-every-enter
from zsh-git-prompt.
Fixed by defining a precmd
function in my .zshrc file.
source ~/.zsh.d/zsh-git-prompt/zshrc.sh
function precmd {
PROMPT="%{$fg[green]%}%c $(git_super_status)%{$fg[red]%}~%{$fg[white]%}เฟ %{$reset_color%}"
}
from zsh-git-prompt.
@klaasb Changing to single quotes works for me. Thanks!
from zsh-git-prompt.
+1 for single quote fix
I used it to implement a much simpler color indicator
from zsh-git-prompt.
@cevaris That actually seems to have worked. I'll test the rest of today and see if there are any bugs or situations where it doesn't work. Thanks!
from zsh-git-prompt.
๐
from zsh-git-prompt.
Just a note that this single quote thing is valid for all files in the custom/
folder.
This gave me a hard time after having copied over code from my .bash_aliases
. Some aliases there defined with double quotes made my git prompt stopped working again.
The following will cause issues
## Recursively delete `.DS_Store` files
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
## Kill all the tabs in Chrome to free up memory
# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
Had to flip the single and double arrangement: single quote outside, double quote inside
## Recursively delete `.DS_Store` files
alias cleanup='find . -type f -name "*.DS_Store" -ls -delet'
## Kill all the tabs in Chrome to free up memory
# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
alias chromekill='ps ux | grep "[C]hrome Helper --type=renderer" | grep -v extension-process | tr -s " " | cut -d " " -f2 | xargs kill'
from zsh-git-prompt.
source ~/dotF/zsh-git-prompt/zshrc.sh
function precmd {
export RPS1='$(git_super_status)'
}
from zsh-git-prompt.
Related Issues (20)
- New Active Fork with Fixes and New Features HOT 5
- not working check git in folder HOT 2
- Git branch push info is not showing HOT 1
- which are the dependencies? Not working at all. HOT 1
- Prompt shows garbled HOT 5
- some error message on ubuntu 20.04 HOT 1
- Missing fetch on git checkout
- Example of ~/.zshrc HOT 5
- zsh: command not found: git_super_status error HOT 1
- zsh-git-prompt not working nicely with `set -x` HOT 2
- doesn't work with mac HOT 1
- git_super_status appears twice on cli HOT 2
- Symbol to distinguish untracked local branch HOT 2
- docker volume with different permissions causes: integer expression expected
- zsh is extremely slow when I use zsh-git-promoty
- Please add a screen shot
- Confused about the robby russels theme's usage of this plugin
- Problem after updating to Mac OS 12.3 (21E230) HOT 5
- Maintain zsh-git-prompt by new community. HOT 5
- not working after configuration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zsh-git-prompt.