Operating System - HP-UX
1753971 Members
7620 Online
108811 Solutions
New Discussion юеВ

Re: Command Prompt get truncated to 80 chars whenever recall command using ESC-k

 
Geoff Wild
Honored Contributor

Re: Command Prompt get truncated to 80 chars whenever recall command using ESC-k

Expand window, type in:

resize

Then you should see it.

This is what I do fro .profile

HOST=`uname -n`
PS1="
\$LOGNAME@\$HOST [ \$PWD ]
# ";export PS1

That way, commands are on line below the path.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
JLiYim
Occasional Advisor

Re: Command Prompt get truncated to 80 chars whenever recall command using ESC-k

If there is no way to prevent the truncate, how can I ensure that the prompt only display the last 80 characters?

Currently, PS1 is set as follows:
export PS1='['`whoami`'@'`uname -n`']$PWD>> '

John
Bill Hassell
Honored Contributor

Re: Command Prompt get truncated to 80 chars whenever recall command using ESC-k

After a while, these really long $PWD prompts can be very annoying, even if they are on a separate line. Usually, you know the parent structure of where you are located and you only need the current directory and the next higher directory. This will accomplish that task and avoid the truncation:

export PS1='${PWD##${PWD%/*/*}/} $ '


Bill Hassell, sysadmin