1
vote
3answers
72 views

Problem when splitting command with backslash in unix prompt

I often use the space-backslash combination ( ) to split a command and its parameters into various lines and make it more readable: /home/user> ls -ltra \ > file1.txt \ > file2.txt ...
2
votes
2answers
2k views

Change Korn prompt to show shorter path for working directory

I have changed my .kshrc to show my prompt as follows: 511 /export/home/students/cninja $ where 511 is the command number and ../students/cninja is the current working directory. Is it possible to ...
1
vote
2answers
467 views

How to set the command(s) that get run before every single prompt?

I used to know this but I forgot: I want to execute a command or a couple of commands before every single prompt. When I am in our PROD box, I want a big fat reminder above every prompt that says * ...
5
votes
2answers
4k views

Colored Prompt in KornShell

According to this StackOverflow post, it is possible have a colored prompt in KornShell. I have not been able to figure out how to do this. I am able to use color: echo -e "\033[34mLinux\033[00m" ...
2
votes
2answers
638 views

How to get green/red terminals under OpenBSD?

For linux machines I can use: # vi ~/.bashrc # red/green terminal colors regarding exit code export PROMPT_COMMAND='PS1="` if [[ \$? = "0" ]]; then echo "\\[\\033[0;32m\\]"; else echo ...
2
votes
1answer
1k views

Multiline PS1 prompt

Is the a way to specify a multi line prompt in Korn shell? I am planning to swhitch from bash to ksh. In bash I have a very simplistic prompt, but it is 2 line prompt. I hate when input position ...