Если вы запускаете скрипт, вы можете установить любые опции, просто добавив set option
, как в файле запуска:
#!/usr/bin/env tcsh
set globstar
# .. your code ..
Для Makefile то же самое должно работать:
SHELL=/bin/tcsh
all:
set noglobstar
set
Кроме этого, нет простого способа сделать это, кроме как изменить файл запуска.Насколько я могу найти на странице руководства, нет переключателя для установки параметра при запуске, и, к сожалению, tcsh не позволяет изменять расположение файла запуска с помощью аргумента командной строки.
Чтобы избежать изменения отдельныхФайлы запуска пользователя, вы можете поместить изменения в масштабе всей системы /etc/csh.cshrc
.От tcsh(1)
:
Startup and shutdown
A login shell begins by executing commands from the system files
/etc/csh.cshrc and /etc/csh.login. It then executes commands from
files in the user's home directory: first ~/.tcshrc (+) or, if
~/.tcshrc is not found, ~/.cshrc, then the contents of ~/.history (or
the value of the histfile shell variable) are loaded into memory, then
~/.login, and finally ~/.cshdirs (or the value of the dirsfile shell
variable) (+). The shell may read /etc/csh.login before instead of
after /etc/csh.cshrc, and ~/.login before instead of after ~/.tcshrc or
~/.cshrc and ~/.history, if so compiled; see the version shell vari‐
able. (+)
Non-login shells read only /etc/csh.cshrc and ~/.tcshrc or ~/.cshrc on
startup.