Closed gibbling closed 8 years ago
installing bobthefish which is similiar in appearance will only show current directory in the prompt unless its a git repo. Not sure that helps narrow anything down.
no those are still commented on the agnoster fish_prompt.fish
Same result just with user and machine name included before working dir.
I just had a look into the theme again, debugged a bit and found that this change was introduced with PR #3
have a look at this gist, hopefully it solves the problem :smiley: https://gist.github.com/sn0cr/44d9351d3ccb365a0bfc
Using that gist instead has solved the problem. I wonder if this would of been an present if I didn't have svn installed.
@sn0cr Does that gist fix the issue or just "rollback" the changes?
I reverted back to the original fish_prompt.fish after manually gutting svn from osx and the persistent prompt was not present. I then installed svn via homebrew and it returned.
I dont want to speak for @sn0cr but it looks like from this diff it just doesn't merge the "if type" and "if command" as one statement. Looks like this was the original fix mentioned here https://github.com/oh-my-fish/theme-agnoster/issues/3#issuecomment-125811592
< 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
---
> 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"
Indeed - the 'and' did cause the persistent segment @bpinto it's a partly rollback - the nested if does solve the issue here - but I don't know why...
I see, submit a PR @sn0cr?
I think this has been fixed. Closing this for now.
Hello,
I recently updated omf and after installing agnoster I see the git section of the prompt always. If I enter an actual repo it shows a second git in the prompt with the name of the branch. I tried deleting the downloaded theme from the omf themes folder and rerunning omf install to pull it down but it is a persistent problem.