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
Add vcsinfo plugin #121
Add vcsinfo plugin #121
Conversation
migrated functionality to top level support. the lib/git.zsh file is largely antiquated now. |
* Favor the vcs_info functionality
Ryan, Have you been running off of these changes for a while? Everything sem smooth still? |
Yes... I have not run into any issues. |
Would be nice to see this merged into master :) |
Definitely agree that this would be a better approach to take. I'd like to see this merged or at least integrated as an alternative in the themes that could be used by people that don't just use git. |
rphillips, It appears that this will not merge automatically at the moment. Can you take a look and help us get it ready to be merged? If necessary, we can put a hold on any new theme additions for a few days while you sort it out. |
I'll take a look |
Conflicts: lib/git.zsh themes/Soliah.zsh-theme themes/theunraveler.zsh-theme
Fixed the merge conflicts and things still seem to be working. |
Is there anything else needed to get this merged? |
There are some who want more Git control than vcsinfo provides. As an only Git user, I am more likely to use @ashleydev's work. However, if I were to use multiple version control systems, I would certainly use vcsinfo. Flexibility is needed to allow people to use whatever version control system plugin they desire. |
Another vote for merging this, I have bazaar and git repositories and would love to get a consistent interface. |
@iandol you won't -- even though |
Some themes like |
OK, steeef does what I want (after adding bzr to the setup) so thank you for the suggestion. I'd still imagine that using the built-in zsh VCS support that supports many different systems has a benefit for oh-my-zsh as the default (and let plugins/themes handle the more advanced users). |
I disagree. vcs_info is not that great because it targets the lowest common denominator. Git is the most used VCS. Bazaar is only used by Canonical/Ubuntu and a few GNU projects. Thus, it's not a priority. |
I could rewrite this functionality to use vcsinfo to hook the vcs detection, then write a plugin system within oh-my-zsh which would preserve the current functionality for git, and add support for the other version control systems. Thoughts? |
@rphillips There is no need. There are not enough non-Git users. |
I hope you aren't serious on that ... |
Using vcs_info does seem the more generic default going forward, obviously discussing this on Github and this being a Github project selects a Git heavy commenting community, but I assume there have to be OMZ users who will use VCSs other than Git or collaborate with people who do! I have SVN, mercurial, Bazaar and git repositories for various projects I follow, is that really uncommon? |
Since there is not enough noise, one can only concluded that there are either few non-Git users or that said non-Git users are satisfied. The following themes use vcs_info; use one.
|
Well, it's not surprising to see not that many non-Git users on GitHub :) |
Considering that GitHub is this project's home, where else would one submit non-Git issues? If I have a problem with a project hosted in a SourceForge Subversion repository, I will submit an issue on SourceForge even though I do not use Subversion because the VCS and the issue tracker are mutually exclusive. Sorin Ionescu On Monday, 12 September 2011 at 14:56, Sergei Lebedev wrote:
|
Based on statistics, I guess that many zsh users use a non-Git VCS. Then, why are there few comments from non-Git users? In my case, I use Mercurial mainly and I create this GitHub account yesterday to request pull. Therefore, if I don't come back here to check a status of my request, I also don't know there is a discussion for non-Git VCS in this "Pull Requests" section... behind the "Show more" button. Like others, I am also disappointed when I find there is no Mercurial prompt on default theme. However, OMZ is hosted on GitHub and it looks so Git-oriented and -friendly project (see that default prompt and examples!), I don't want to disturb people who already use it and are satisfied with it. "Mercurial? Who uses that, maybe you and only few?" Like me, most of users come in, install OMZ, find that it only supports Git (it's not true), and they just quit or use as it is. It is natural that only few of them are enthusiastic enough to create account and suggest their opinion, and lucky enough to find this thread. I have tested and quit hundreds of applications without mentioning its inconvenience to its creator. Is it only me who follows this routine? Before I see those mentions about few non-Git users, I think that developers also want to support other VCS but just don’t have resources to do that. I leave this comment as another non-Git user who wants more VCS supports, even though I had to struggle to write this long comment in English. If there is any rudeness here, it’s my fault. However, please understand that I don’t intend it. |
@wjkoh, Welcome to GitHub. You can use GitHub with Mercurial. See http://hg-git.github.com. Make sure you have the bookmarks plugin enabled. The problem with making the default theme a A good approach would be to list In the effort to make #377 a reality, in my fork, I have rewritten the Git plugin and converted a few themes to the native ZSH theming system. Right now, I have a dedicated Git plugin and delegate all other version control systems to Since if git-info && [[ -n "$git_prompt_info" ]] || [[ -n "$git_rprompt_info" ]]; then
vcs_prompt_info="$git_prompt_info"
vcs_rprompt_info="$git_rprompt_info"
elif hg-info && [[ -n "$hg_prompt_info" ]] || [[ -n "$hg_rprompt_info" ]]; then
vcs_prompt_info="$hg_prompt_info"
vcs_rprompt_info="$hg_rprompt_info"
else
unset vcs_prompt_info
unset vcs_rprompt_info
fi In the theme file, one would replace the word 'git' with 'vcs', and it should just work. Perhaps, @sjl will clone my rewritten Git plugin and make it work for Mercurial using his hg-prompt. TL;DR: Trying to please everybody always results in pleasing nobody. |
Why don't you try improving |
I have looked into improving I am not reinventing the wheel. I have written a Git plugin since, at the moment, I only care about Git. That said, I have given, in the post above, non-Git users options if they don't like Since I do not expect anyone, except maybe @sjl, to write an awesome Mercurial plugin, that wrapper above, which you distaste for reinventing |
…5741 3dc5741 Merge pull request ohmyzsh#140 from randomize/pr_fix_issue_#77 10391d0 Merge pull request ohmyzsh#134 from sonnym/enable_quick_history_substitution_highlighting 443908b Merge pull request ohmyzsh#142 from jcassee/master eb9870f Merge pull request ohmyzsh#143 from vincentbernat/fix/yank-pop 74a1834 zle: don't override yank/yank-pop d7d4dff Add 'line' highlighter for the whole buffer 7edd081 Chaned main highlighter alorithm to resolve issue ohmyzsh#77 e8cc271 Resolves slow performance in brackets highlighter 5320f1e Merge pull request ohmyzsh#135 from arcan1s/patch-1 dcb5da9 Update README.md c83e266 ohmyzsh#110: Now using :A modifier, bump zsh version requirement 072c064 Merge pull request ohmyzsh#110 from xaocon/master 04f9c88 highlight ^old^new pattern f289a9f Merge pull request ohmyzsh#125 from acatton/fix-121 8ac9641 Merge pull request ohmyzsh#131 from MarkLodato/array-assignments ffce2a0 Merge pull request ohmyzsh#133 from lucc/master 63a720a Merge pull request ohmyzsh#128 from knu/patch-1 784a5dc protect alias expansion from interpreting aliases as options 441f1a8 highlight array assignments of the form x[y]=... c62cb54 do not remove quotes when checking assignments 0fc6b07 Do not leak a variable: cdpath_dir. dffbab0 a more simple and universal way (for zsh projects) to find highlight dir path 3b3a58b Fix ohmyzsh#121: sudo syntax highlighting incorrectly 0fcc262 Finds highlighters dir a little better git-subtree-dir: plugins/zsh-syntax-highlighting git-subtree-split: 3dc5741
Parse sudo command line in order to highlight the options correctly
Fix ohmyzsh#121: sudo syntax highlighting incorrectly
Fixes issue 43.
I believe it would be better to remove the lib/git.zsh support in favor of the vcsinfo plugin. Native zsh has support for bzr, cdv, cvs, darcs, git, hg, mtn, p4, svk, svn, tla, git-p4, and git-svn. This makes for a more flexible SCM solution within oh-my-zsh.
Regards,
Ryan
http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#SEC273