DEV Community

Discussion on: What are your favorite bash aliases?

Collapse
 
mzaini30 profile image
Zen

alias? I use bash files to run commands like alias.

Example:

  • Create file in ~/bin/ (eg: hello file)
  • Run sudo chmod +x hello
  • Type command in hello
  • Then, if I'll run the command, I type hello (like alias)

And these're my fav:

github

git clone --depth=1 user:pass@github.com/user/$1

upload

git status
git add -A .
git commit -m "upload"
git push
Collapse
 
roelofjanelsinga profile image
Roelof Jan Elsinga

That's a good idea as well! Perhaps a cleaner solution as well. I like aliases because I can add them to my setup bash script for new systems, append them to the .bashrc, source it and I'm good to go! I'll definitely look into your solution though, because that sounds very clean and allows for much more complex workflows as well.