Refactor func names for consistency's sake

This commit is contained in:
Henrik Lissner 2013-03-20 19:59:17 -04:00
parent 90889f5f88
commit d6ad7ba856

View file

@ -1,12 +1,12 @@
#!/bin/bash #!/bin/bash
function short_pwd() { prompt_pwd() {
SHORTPWD=`print -Pn "%4~"` SHORTPWD=`print -Pn "%4~"`
[[ "${SHORT_PWD:0:1}" =~ "[^/~]" ]] && SHORT_PWD=".../$SHORT_PWD" [[ "${SHORT_PWD:0:1}" =~ "[^/~]" ]] && SHORT_PWD=".../$SHORT_PWD"
echo -n $SHORTPWD echo -n $SHORTPWD
} }
function git_prompt() { prompt_git() {
if [ "`git_prompt_info`" ]; then if [ "`git_prompt_info`" ]; then
echo -n "$(git_prompt_info)" echo -n "$(git_prompt_info)"
fi fi
@ -39,10 +39,10 @@ prompt() {
rprompt() { rprompt() {
# Make the rprompt a bright grey to set it apart # Make the rprompt a bright grey to set it apart
echo -n "%{$FG[245]%}" echo -n "%{$FG[245]%}"
echo -n '$(short_pwd)' echo -n '$(prompt_pwd)'
# Show the branch/status if in a git repo # Show the branch/status if in a git repo
echo -n '$(git_prompt)' echo -n '$(prompt_git)'
# Reset formatting for command output # Reset formatting for command output
echo -n "%{$reset_color%}" echo -n "%{$reset_color%}"