Skip to content
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

Remove gm alias due to conflicts with graphicsmagick #2406

Closed
wants to merge 2 commits into from

Conversation

mgalgs
Copy link
Contributor

@mgalgs mgalgs commented Jan 7, 2014

The graphicsmagick package provides a gm' utility. Remove thegm'
alias so that it doesn't clash.

Fix typo: gm -> gmt
The graphicsmagick package provides a `gm' utility. Remove the `gm'
alias so that it doesn't clash.
@LFDM
Copy link
Contributor

LFDM commented Jan 7, 2014

Hm, 0f2ef1c is indeed a good find and needs to be merged.

Removing the gm alias I am not so sure. Such big alias lists can never be without conflict and I think more people might use git than graphicsmagick.
Seems to me something you should customize yourself: After sourcing oh-my-zsh, just place unalias gm in your .zshrc and you're good.

There's still the issue of the compdef left, I am actually not sure what happens. You might see git completions with graphicsmagick then? Would make sense, but I cannot confirm it. Can you try and report your findings?

@mgalgs
Copy link
Contributor Author

mgalgs commented Jan 7, 2014

Ah, I didn't know about unalias, that is a better approach.

Yes, completion is broken for gm after dropping c6f9e17 and unalias'ing gm, but I can live with that. gm (from graphicsmagick) had some completion going so I'll see if I can do a compdef after loading the git plugin.

I've separated 0f2ef1c into a separate PR so that it can be merged independently (#2407).

@mgalgs mgalgs closed this Jan 7, 2014
@LFDM
Copy link
Contributor

LFDM commented Jan 7, 2014

Probably a hack, there may be a native zsh way to do it, but take a look:

# compinit creates the compdump file, where the information about 
# what's completing how is held
=> cat $ZSH_COMPDUMP | grep 'gm'
'gm' '_git'
'gmake' '_make'
'gmplayer' '_mplayer'
'gm' 'git-mergetool' # this would be fixed in the future by your commit
release_compdef() {
  for name in $@; do
    sed -i "/^'$name' /d" $ZSH_COMPDUMP
  done
}
=> release_compdef gm
=> cat $ZSH_COMPDUMP | grep 'gm'
'gmake' '_make'
'gmplayer' '_mplayer'

# It's gone! And the completion disabled.

@mgalgs
Copy link
Contributor Author

mgalgs commented Jan 7, 2014

Whoa that's pretty nifty. I ended up doing this after loading the git plugin:

compdef _graphicsmagick gm

Seems to be working since there's a _graphicsmagick completion function being pulled in from somewhere.

@mgalgs mgalgs deleted the rm-gm branch January 7, 2014 23:23
@LFDM
Copy link
Contributor

LFDM commented Jan 7, 2014

That's better in your case for sure :) Well, that worked out fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants