i am on RedHat 6. i am trying to create an alias that takes arguments, but in order to make the alias more "readable" i want to create it in multiple lines (see code below) The alias is in a text file called "reg_aliases"
Example: instead of
alias run_reg ' svn up ; cd project ; compile \!* ; cd project2 ; compile \!* '
desired:
alias run_reg ' svn up
cd project ; compile \\!* ;
cd project2 ; compile \\!* ; '
i tried to add "\" after each line but the last one, it did not work either.
Original Code:
alias comp_env_none 'arun -c -toppath \\!* -sncomp'
alias run_reg ' svn up $PROJECT; cd $PROJECT/work; comp_env_none $TOP -clean; cd $PROJECT/work_2 ; comp_env_none $TOP2 ; vmanager -gui \\!* '
tried to do this:
alias run_reg ' svn up $PROJECT; \
cd $PROJECT/work; comp_env_none $TOP -clean; \
cd $PROJECT/work_2 ; comp_env_none $TOP2 ; \
vmanager -gui \!* '
and it did not work. any suggestion on how to create such an alias ?