Skip to main content

All Questions

Tagged with
3 votes
1 answer
5k views

How to create an alias for two Git commands that use a parameter? [duplicate]

I regularly have to delete a local and remote Git branch. Therefore, I run the following commands: $ git branch -d feature-branch $ git push --delete origin feature-branch Since I mostly execute ...
JJD's user avatar
  • 587
7 votes
5 answers
6k views

Get the expansion of an alias (in both bash and zsh)

I want to get the expansion of an alias. For example, if I have: alias g=hub alias cdh='cd $HOME' I want to have: expand_alias g == hub expand_alias cdh == cd $HOME The tricky thing is that the two ...
Tom Hale's user avatar
  • 31.2k
0 votes
1 answer
333 views

What is the best way for storing and versioning his aliases/functions/symlinks?

actually I have these lines (exemplary) in my .zshrc file: . ${TOOLS_HOME}/cli/.cli_base . ${TOOLS_HOME}/cli/.cli_functions . ${TOOLS_HOME}/cli/.cli_symlinks This works fine so far. My only problem ...
m1well's user avatar
  • 101