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

Structure all aliases (one PR per command group) #2080

Open
50 tasks
EmilyGraceSeville7cf opened this issue Feb 7, 2022 · 2 comments
Open
50 tasks

Structure all aliases (one PR per command group) #2080

EmilyGraceSeville7cf opened this issue Feb 7, 2022 · 2 comments

Comments

@EmilyGraceSeville7cf
Copy link
Contributor

EmilyGraceSeville7cf commented Feb 7, 2022

Add new several aliases where each alias consists of first two letters of each word.

List of existing aliases

  • ag
  • ansible
  • apt
  • atom
  • bash-it
  • bolt
  • bundler
  • clipboard
  • composer
  • curl
  • dnf
  • docker
  • docker-compose
  • emacs
  • fuck
  • general
  • git
  • gitsvn
  • heroku
  • hg
  • homebrew
  • homebrew-cask
  • homesick
  • jitsu
  • kubectl
  • laravel
  • maven
  • msys2
  • node
  • npm
  • osx
  • phoenix
  • puppet
  • pyrocms
  • rails
  • svn
  • systemd
  • terraform
  • terragrunt
  • textmate
  • tmux
  • todo.txt-cli
  • uuidgen
  • vagrant
  • vault
  • vim
  • yarn

List of new aliases

  • echo, printf
  • if, for, while, until, select
  • declare, local, typeset, let
@EmilyGraceSeville7cf EmilyGraceSeville7cf changed the title Structure all aliases (one PR per command) Structure all aliases (one PR per command group) Feb 7, 2022
@gaelicWizard
Copy link
Contributor

gaelicWizard commented Feb 8, 2022

Sorry, I'm generally against adding aliases that are not obviously useful to the intended audience. (Obviously they don't need to be useful to everyone!) Aliases are captured by functions, so adding unneeded aliases increases unforeseen risks in entirely unrelated code.

for example:

alias gs='git stash'

function Ghostscript-something-something() {
    # some stuff...
    gs --silent --sss=blah
}

type Ghostscript-something-something

Notice that my function definition mentions git absolutely nowhere, but notice alsö that when I ask for it's definition it absolutely does say git stash right there.


The Bash manual says to use functions instead of aliases. Aliases are evaluated at input, not at parse, which is wild and makes my brain hurt. Aliases are not just convenience shortcuts!

@EmilyGraceSeville7cf
Copy link
Contributor Author

EmilyGraceSeville7cf commented Feb 8, 2022

I want make alises easy to memorize. I can't find any naming rules for them now. But also I don't want make breaking change (rename aliases) because they may be in use now. That's why I add new aliases instead of renaming and note about somewhere in changelog. After a while I am going to remove old aliases.

Here is an example:

alias yaa='yarn add' # YArn Add
alias yapa='yarn pack' # YArn PAck, but not YArn Pack

How to remember which aliases use just first letter of the second word and what use two or more letters? There are many such examples. It's the same problem as short options with just different letter case. How to remember when and why use each case? ;)

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

No branches or pull requests

2 participants