DEV Community

Discussion on: Minimizing Keystrokes, Maximizing Productivity  -  Bash Scripting

Collapse
 
toby profile image
toby

Nice post!

A few small improvements ;)

  • Aliases and functions normally reside in .bash_aliases rather than the rc file.
  • gcc may clash with the widespread gnu gcc program which is run using the same command, perhaps gcd could serve the same purpose here
  • Aliasing in something that adds -a or . in git is not generally considered good practice due to the potential for unexpected results, adding and committing are very specifically separate commands. At best, users should be aware of the possible issues (which others on the internet have explained better than I could)
Collapse
 
akshansh2000 profile image
Akshansh Bhanjana

Thanks for the suggestions!

Yes, I believe putting the aliases and functions in a separate file would immensely clean up the rc files, so I'd be careful to do that from now.

As for the gcc, this never occurred to me as I never really used gcc apart from compiling cpp files with g++. Perhaps, I should add a little note in my post telling others to make sure that the aliases/functions do not try to override any other command :)

Ahh, I'll definitely read up about it; thanks for pointing this out :D