I'm working on a system with a lot of tcsh configuration scripts, requiring me to run most programs through tcsh. I've attempted to make this easy for myself by adding this to my ~/.zshrc
:
# run command in tcsh
function t() {
tcsh -c "$@"
}
This works for something like t ls
, but fails for t ls -l
, which gives the error Unknown option: `-l' Usage: tcsh ...
, and is clearly passing -l
as an argument to tcsh
, not to ls
.
How can I quote the string passed in $@
?