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

the aliases of the module git clobber common commands such as grc #2

Closed
Konfekt opened this issue Jan 8, 2020 · 2 comments
Closed

Comments

@Konfekt
Copy link

Konfekt commented Jan 8, 2020

How about checks such as

! command -v grc >/dev/null 2>&1 && alias grc='git ...'

to avoid unexpected results for the user; for example, he might have aliased a command to use grc.

@ericbn
Copy link
Member

ericbn commented Jan 8, 2020

Yeah, actually a LOT of commands are clobbered. See b2a2ffb

I was impressed to check how many actually shadow existing commands, using Ubuntu's command-not-found:

'gb'  : apt install gb
'gc'  : apt install graphviz
'gcp' : apt install gcp
'gcs' : apt install opengcs
'gcv' : apt install scotch
'gdc' : apt install gdc
'gfm' : apt install gfm
'gid' : apt install id-utils
'gld' : apt install postfix-gld
'gm'  : apt install graphicsmagick
'gmt' : apt install gmt
'gp'  : apt install pari-gp
'gpa' : apt install gpa
'gpp' : apt install gpp
'gpt' : apt install gpt
'grc' : apt install grc
'gri' : apt install gri
'gs'  : apt install ghostscript
'gsl' : apt install generator-scripting-language
'gss' : apt install libgss-dev
'gt'  : apt install genometools
'gtv' : apt install smpeg-gtv
'gwc' : apt install geneweb
'gwd' : apt install geneweb

Did you check https://github.com/zimfw/git/blob/58810c2/README.md#settings ?

I can think of these solutions, if we really want to have "sane defaults":

  1. Remove the git module from the installation template, so it's not installed by default.
  2. Change the default prefix in the git module to G. Also add a commented # zstyle ':zim:git' aliases-prefix 'g' to the installation template, so users can easily see they can choose a different prefix.

I'd go with option 2.

Thoughts? (👍 to vote in option 1, ❤️ to vote in option 2)

CC @Eriner, @hypnoglow, @@sebastianst, @well1791, @sQVe, @BrainMaestro, @Plloi

ericbn added a commit to zimfw/install that referenced this issue Jan 17, 2020
suggesting that the aliases-prefix can be customized to 'g'.
See zimfw/git#2
@ericbn ericbn closed this as completed in d3a3a0b Jan 17, 2020
@ericbn
Copy link
Member

ericbn commented Jan 17, 2020

Done! 😅

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

No branches or pull requests

2 participants