Thu, 4 Aug 2016 00:19:44 +0200 Uwe Werler <uwe.wer...@retiolum.eu>
> Hello list,
> 
> maybe this can be done better (~/.kshrc):
> 
[..]
> 
> PS1='\h:$(_pwd)\\$ '
> 
> Any hints?
> 
> Thanks in advance.

Hi Uwe,

The best advice as always: simplicity.  Check in ksh(1), parameter PS1:

man ksh - public domain Korn shell (parameters)
[http://man.openbsd.org/ksh#Parameters]

You know, you've gone too far with the file and directory names when \w
path does not fit on one line.  Hiding this fact is harmful obscurity..

$ grep PS1 .profile
export PS1='\n\a=== \d [\A] \u@\h(\l) \w j\j e$? h\!\n\$ '

You're probably looking for directory abbreviation tools to help this:

dirabbrev - abbreviations for long directory paths
[https://staff.science.uva.nl/c.dominik/Tools/dirabbrev/]

At first glance, it's probably way too much for prompt display anyway..
I'd personally reduce this as much as possible with the ksh(1) default.

You can always call external tools for more information.  You'll over
time decide how often you need it, and not feel limited on new setups.

Kind regards,
Anton

Reply via email to