Closed MarkHerhold closed 9 years ago
Agreed. Could you submit a PR?
@bpinto Possibly. I'll have to request approval.
I fixed this issue doing type svn
, here's the function changed:
function prompt_svn -d "Display the current svn state"
set -l ref
if type svn >/dev/null 2>&1
if command svn ls . >/dev/null 2>&1
set branch (svn_get_branch)
set branch_symbol \uE0A0
set revision (svn_get_revision)
prompt_segment green black "$branch_symbol $branch:$revision"
end
end
end
@FabioAntunes Nice! Could you merge both if scenarios with an and
?
@bpinto sure, here's the merge function:
function prompt_svn -d "Display the current svn state"
set -l ref
if type svn >/dev/null 2>&1; and command svn ls . >/dev/null 2>&1
set branch (svn_get_branch)
set branch_symbol \uE0A0
set revision (svn_get_revision)
prompt_segment green black "$branch_symbol $branch:$revision"
end
end
Hey, would you submit as a PR? Sorry for the trouble!
I'm sorry, but this PR creates the bug documented in PR #5 - it shows the svn branch symbol at any time (on OS X).
It appears that agnoster is looking to see if svn is installed but is causing an error in the process. Perhaps
which svn
might be a better match for this check?System: Ubuntu 14.04 x64
I fixed the issue by installing subversion
sudo apt-get install subversion
but I feel like users shouldn't have to do that.