tcsh-org / tcsh

This is a read-only mirror of the tcsh code repository.
https://www.tcsh.org/
Other
237 stars 42 forks source link

skip loading/sourcing of user files #6

Closed Zohman closed 6 years ago

Zohman commented 6 years ago

Hi,

As i've checked the man page there is no flags like --noprofile --norc to disable sourcing some files like bash.

i have a scenario where i want to load only global system-wide files like /etc/csh.cshrc, /etc/csh.login , etc.. but skip the user home files ~/.cshrc, ~/.tcshrc, etc.

i understand that i will need to compile from source to achieve this (right..?) asking if anyone know where can i mark this on source?

Thanks!

Zohman commented 6 years ago

i found it,

./tc.const.c:Char STRsldottcshrc[] = { '/', '.', 't', 'c', 's', 'h', 'r', 'c', '\0' }; ./tc.const.c:Char STRsldotcshrc[] = { '/', '.', 'c', 's', 'h', 'r', 'c', '\0' }; ./tc.const.c:Char STRsldotlogin[] = { '/', '.', 'l', 'o', 'g', 'i', 'n', '\0' };

changed and compiled, worked for me.

zoulasc commented 6 years ago

On Aug 23, 9:01pm, notifications@github.com (Zohman) wrote: -- Subject: [tcsh-org/tcsh] skip loading/sourcing of user files (#6)

Hi,
As i've checked the man page there is no flags like --noprofile --norc to disable
sourcing some files like bash.
i have a scenario where i want to load only global system-wide files like /etc/csh.cshrc, /etc/csh.login , etc..
but skip the user home files ~/.cshrc, ~/.tcshrc, etc.
i understand that i will need to compile from source to achieve this (right..?)
asking if anyone know where can i mark this on source?
Thanks!

Look how the 'fast' variable is being processed in sh.c

christos