lc / gau

Fetch known URLs from AlienVault's Open Threat Exchange, the Wayback Machine, and Common Crawl.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gau binary conflict (ohmyzsh git.plugin alias)

v7nc3nz opened this issue · comments

As gau binary conflict with the gau git inbuild alias
gau stands for git add --update (Also: "git add -u")

when you fire
go get -u github.com/lc/gau
this will clone the directory in our $GOPATH/src/github.com/lc/gau......
and this will install binary in the $GOPATH/bin with the name of gau

This issue will cause name conflict between your binary "gau" and git alias "gau"(git add --update)

so this problem will only resolve by changing your repo to a different name , or we should change the $GOPATH/bin/gau to some another binary name.

Hm, I don't plan on renaming this – where do you see that it's a git alias? As far as I've seen so far it seems to be a user-defined alias, right?

I do see it's defined in the ohmyzsh git plugin:

https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/git.plugin.zsh

Actually now a days most of the users use zsh. so i recommended the above solution.
https://github.com/ohmyzsh/ohmyzsh/wiki/Cheatsheet

@vks2694, I use ohmyzsh as well (didn't have that plugin installed though), so I see how this is problematic

@vks2694,

This is the first time someone's encountered this problem / opened an issue so far – I don't plan on renaming this right now.

Here's a workaround the issue:

You can download the pre-built binaries from the releases page and then move them into your $PATH with a different name

Ex:

▻ tar xvf gau-linux-amd64.tar
▻ mv gau-linux-amd64 /usr/bin/getallurls

yeah , Thanks

Thanks for flagging this @vks2694, I'm going to pin this and add a note in the README. Should more people encounter this issue I may consider renaming.

@lc Another obvious as option (as a ohmzsh user and gau) is to unalias gau for git because it's rarely used;
Edit with your favorite editor (that should be Vim :) ) and comment out the alias:

vim ~/.oh-my-zsh/plugins/git/git.plugin.zsh
# alias gau='git add --update'

@omerxx, yep! Thanks for pointing that out 👍 Once you're in the vim club you can't quit 😉

commented

@lc Another obvious as option (as a ohmzsh user and gau) is to unalias gau for git because it's rarely used;
Edit with your favorite editor (that should be Vim :) ) and comment out the alias:

vim ~/.oh-my-zsh/plugins/git/git.plugin.zsh
# alias gau='git add --update'

A second possible solution is that make an alias for "gau" binary in .zshrc as your wish and use it.

commented

Instead of editing the oh-my-zsh plugin, which could cause problems with git conflicts is to set unalias gau in your .zshrc after the line source $ZSH/oh-my-zsh.sh

I don't use the gau git alias so this has been the simplest for me.

Can confirm this conflict in oh-my-bash as well.

Instead of editing the oh-my-zsh plugin, which could cause problems with git conflicts is to set unalias gau in your .zshrc after the line source $ZSH/oh-my-zsh.sh

I don't use the gau git alias so this has been the simplest for me.

Thank you so much, it's working now!

@lc Another obvious as option (as a ohmzsh user and gau) is to unalias gau for git because it's rarely used;
Edit with your favorite editor (that should be Vim :) ) and comment out the alias:

vim ~/.oh-my-zsh/plugins/git/git.plugin.zsh
# alias gau='git add --update'

Thanks man.

This also affect gf also but just renaming the gau to gauu and gf to gff.

problem solved.

Sadly renaming the gau alias to something else breaks the oh-my-zsh update. It'll ask you to stash your changes.

Yes

Follow this to avoid conflict
#8 (comment)

I had the same issue with gf by tomnomnom