I\'d need to be able to define an alias in a Debian shell that includes other aliases, for a project I\'m currently working on.
Let\'s look at a code example to make thi
I used this in csh and it worked for me :
alias new_alias 'vi old_alias'
Here is an example of alias that i'm using
#clear
alias cls='clear; ls'
alias ccls='cd; cls' # used alias cls
To reuse alias in another alias use:
foobar='foo;bar'
However I would suggest you to consider using shell function to get better control over this.
Following @anubhava's sage advice:
foo() { echo foo; }
bar() { echo bar; }
foobar() { echo "$(foo)$(bar)"; }
fooandbar() { echo "$(foo)and$(bar)"; }
Spaces and semicolons inside {}
are required there.