-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bzr: "number expected" #301
Comments
Which branch do you use? |
shell: zsh |
I can't say zsh gives the most descriptive errors, but this is caused by line 1066 of liquidprompt, line 15 of _lp_bzr_branch_color. This is valid in bash, but not zsh, for two reasons:
Here is a quick patch that I made: diff --git a/liquidprompt b/liquidprompt
index e914b49..63952b3 100755
--- a/liquidprompt
+++ b/liquidprompt
@@ -1063,7 +1063,10 @@ _lp_bzr_branch_color()
local output
output="$(bzr version-info --check-clean --custom --template='{branch_nick} {revno} {clean}' 2> /dev/null)"
[[ $? -ne 0 ]] && return
- local tuple=($output)
+ $_LP_SHELL_zsh && setopt local_options && setopt sh_word_split
+ local tuple
+ tuple=($output)
+ $_LP_SHELL_zsh && unsetopt sh_word_split
local branch=${tuple[_LP_FIRST_INDEX+0]}
local revno=${tuple[_LP_FIRST_INDEX+1]}
local clean=${tuple[_LP_FIRST_INDEX+2]} I'm not 100% sure that is valid bash, but it certainly is valid (albeit ugly) zsh. |
Please try the |
@dolmen, the development branch doesn't address the issue. It still has the guilty line. |
chase, your patch works for me: $_LP_SHELL_zsh && setopt local_options && setopt sh_word_split
local tuple
tuple=($output)
$_LP_SHELL_zsh && unsetopt sh_word_split |
Fixes #301 without affecting bash functionality
terminal shows this
in a bzr folder
The text was updated successfully, but these errors were encountered: