Customizing the prompt in csh/tcsh
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm trying to customize the prompt in tcsh shell.
for instance say if I were at a directory which is 7 levels deep from the home/user, the prompt displays as below
home/user/L1/L2/L3/L4/L5/L6/L7 >
but I want the prompt to be like this (home/user and the last two directories only )
home/user/.../L6/L7 >
linux prompt tcsh csh
add a comment |Â
up vote
0
down vote
favorite
I'm trying to customize the prompt in tcsh shell.
for instance say if I were at a directory which is 7 levels deep from the home/user, the prompt displays as below
home/user/L1/L2/L3/L4/L5/L6/L7 >
but I want the prompt to be like this (home/user and the last two directories only )
home/user/.../L6/L7 >
linux prompt tcsh csh
FYI csh/tcsh is a terrible shell for interactive use, and even worse for programming. See CSH PROGRAMMING CONSIDERED HARMFUL (note:tcsh
fixes some but not all of the bugs ofcsh
, but still has the same design flaws). It is highly recommended to usebash
,ksh
, orzsh
instead...and limit your scripts to using only POSIXsh
features if you want to write portable scripts.
â cas
Jan 22 at 3:41
Hi Craig Thank yo so much for the info.
â Venkatanathan Ramamurthi
Jan 22 at 3:55
You can limit the expansion of the CWD to n trailing directories by replacing~
byc0n
orC0n
in yourprompt
- but I don't know a way to trim intermediate directories in the way you are asking. See for example Customizing your shell prompt
â steeldriver
Jan 22 at 17:09
@steeldriver thanks man
â Venkatanathan Ramamurthi
Jan 23 at 6:29
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to customize the prompt in tcsh shell.
for instance say if I were at a directory which is 7 levels deep from the home/user, the prompt displays as below
home/user/L1/L2/L3/L4/L5/L6/L7 >
but I want the prompt to be like this (home/user and the last two directories only )
home/user/.../L6/L7 >
linux prompt tcsh csh
I'm trying to customize the prompt in tcsh shell.
for instance say if I were at a directory which is 7 levels deep from the home/user, the prompt displays as below
home/user/L1/L2/L3/L4/L5/L6/L7 >
but I want the prompt to be like this (home/user and the last two directories only )
home/user/.../L6/L7 >
linux prompt tcsh csh
edited Aug 21 at 0:52
Rui F Ribeiro
35.2k1270113
35.2k1270113
asked Jan 22 at 3:26
Venkatanathan Ramamurthi
1
1
FYI csh/tcsh is a terrible shell for interactive use, and even worse for programming. See CSH PROGRAMMING CONSIDERED HARMFUL (note:tcsh
fixes some but not all of the bugs ofcsh
, but still has the same design flaws). It is highly recommended to usebash
,ksh
, orzsh
instead...and limit your scripts to using only POSIXsh
features if you want to write portable scripts.
â cas
Jan 22 at 3:41
Hi Craig Thank yo so much for the info.
â Venkatanathan Ramamurthi
Jan 22 at 3:55
You can limit the expansion of the CWD to n trailing directories by replacing~
byc0n
orC0n
in yourprompt
- but I don't know a way to trim intermediate directories in the way you are asking. See for example Customizing your shell prompt
â steeldriver
Jan 22 at 17:09
@steeldriver thanks man
â Venkatanathan Ramamurthi
Jan 23 at 6:29
add a comment |Â
FYI csh/tcsh is a terrible shell for interactive use, and even worse for programming. See CSH PROGRAMMING CONSIDERED HARMFUL (note:tcsh
fixes some but not all of the bugs ofcsh
, but still has the same design flaws). It is highly recommended to usebash
,ksh
, orzsh
instead...and limit your scripts to using only POSIXsh
features if you want to write portable scripts.
â cas
Jan 22 at 3:41
Hi Craig Thank yo so much for the info.
â Venkatanathan Ramamurthi
Jan 22 at 3:55
You can limit the expansion of the CWD to n trailing directories by replacing~
byc0n
orC0n
in yourprompt
- but I don't know a way to trim intermediate directories in the way you are asking. See for example Customizing your shell prompt
â steeldriver
Jan 22 at 17:09
@steeldriver thanks man
â Venkatanathan Ramamurthi
Jan 23 at 6:29
FYI csh/tcsh is a terrible shell for interactive use, and even worse for programming. See CSH PROGRAMMING CONSIDERED HARMFUL (note:
tcsh
fixes some but not all of the bugs of csh
, but still has the same design flaws). It is highly recommended to use bash
, ksh
, or zsh
instead...and limit your scripts to using only POSIX sh
features if you want to write portable scripts.â cas
Jan 22 at 3:41
FYI csh/tcsh is a terrible shell for interactive use, and even worse for programming. See CSH PROGRAMMING CONSIDERED HARMFUL (note:
tcsh
fixes some but not all of the bugs of csh
, but still has the same design flaws). It is highly recommended to use bash
, ksh
, or zsh
instead...and limit your scripts to using only POSIX sh
features if you want to write portable scripts.â cas
Jan 22 at 3:41
Hi Craig Thank yo so much for the info.
â Venkatanathan Ramamurthi
Jan 22 at 3:55
Hi Craig Thank yo so much for the info.
â Venkatanathan Ramamurthi
Jan 22 at 3:55
You can limit the expansion of the CWD to n trailing directories by replacing
~
by c0n
or C0n
in your prompt
- but I don't know a way to trim intermediate directories in the way you are asking. See for example Customizing your shell promptâ steeldriver
Jan 22 at 17:09
You can limit the expansion of the CWD to n trailing directories by replacing
~
by c0n
or C0n
in your prompt
- but I don't know a way to trim intermediate directories in the way you are asking. See for example Customizing your shell promptâ steeldriver
Jan 22 at 17:09
@steeldriver thanks man
â Venkatanathan Ramamurthi
Jan 23 at 6:29
@steeldriver thanks man
â Venkatanathan Ramamurthi
Jan 23 at 6:29
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f418739%2fcustomizing-the-prompt-in-csh-tcsh%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
FYI csh/tcsh is a terrible shell for interactive use, and even worse for programming. See CSH PROGRAMMING CONSIDERED HARMFUL (note:
tcsh
fixes some but not all of the bugs ofcsh
, but still has the same design flaws). It is highly recommended to usebash
,ksh
, orzsh
instead...and limit your scripts to using only POSIXsh
features if you want to write portable scripts.â cas
Jan 22 at 3:41
Hi Craig Thank yo so much for the info.
â Venkatanathan Ramamurthi
Jan 22 at 3:55
You can limit the expansion of the CWD to n trailing directories by replacing
~
byc0n
orC0n
in yourprompt
- but I don't know a way to trim intermediate directories in the way you are asking. See for example Customizing your shell promptâ steeldriver
Jan 22 at 17:09
@steeldriver thanks man
â Venkatanathan Ramamurthi
Jan 23 at 6:29