Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Soupedup TCSHRC Shell ENV Settings[!Cool!]:
- 1.
- # This yields [time] hostname:cwd \n[TTypd]:[line#]#
- set prompt="%B[%P]%b $[UP]$[DP]:#~\n[%l]:[%h]%%~ "
- 2.
- to use a tcshshell: grab it from ports --> /usr/ports/shells/tcshrc
- set prompt = "\n%~\n%t\n%d, %D `/bin/hostname -s`#~ "
- 3.
- Soupedup TCSHRC-2:
- # Test: should we use full domain, or just host?
- if("$DOMAIN_PROMPT" == "YES") then
- setenv DP '%M'
- else
- setenv DP '%m'
- endif
- # Username?
- if("$USER_PROMPT" == "YES") then
- setenv UP '#n@'
- else
- setenv UP '
- endif
- if("$CUSTOM_PROMPT_ENABLE" == "YES") then
- set prompt="$CUSTOM_PROMPT"
- else
- if("$ROOT_PROMPT_TEST" == "YES" && $EUID == 0) then
- #set prompt="[#~] minegl0wz@$[DP]: %%"
- set prompt="$[DP]:%/\n%Bminegl0wz%%%b "
- else
- # This yields [time] hostname:cwd \n[TTypd]:[line#]#
- set prompt="%B[%P]%b $[UP]$[DP]:#~\n[%l]:[%h]%%~ "
- endif
- endif
- 4.
- set prompt="%m:%{^[[34m%}`id -nu`%{^[[0m%}:%~:%{^[[31m#%h^[[0m%}%#"
- alias cd 'cd \!*;set prompt="%m%{^[[32m%}:`id -nu`%{^[[0m%}:%~:%{^[[31m#%h^[[0m%}%#"
- NOTES:
- On most systems, I turn $DOMAIN_PROMPT and $USER_PROMPT on to remind
- me, but on my box I leave both off. The result for me as a normal
- user is:
- [8:35:10] mortis:~
- (ttypd):{1573}%
- as root is:
- mortis:/root
- root%
- And..
- That the time on the former and the 'root%' on the latter are
- bolded.It IS as well intentional that my normal prompt uses %~,
- which displays the current dir with appropriate ~'s for homedirs,
- while roots prompt uses %/ which does not (Example):
- set prompt="%m:%{^[[34m%}`id -nu`%{^[[0m%}:%~:%{^[[31m#%h^[[0m%}%#"
- alias cd 'cd \!*;set prompt="%m%{^[[32m%}:`id -nu`%{^[[0m%}:%~:%{^[[31m#%h^[[0m%}%#"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement