Antoni V. dixit: >> >>>I've just migrated to mksh, but I'm having trouble with getting the PS1 >> >>>as I had set before. >> >>>My PS1 used to be PS1='\h@\w\$ '.
>> For your prompt, you just need to change line 41 to: >> REPLY+=${HOSTNAME%%.*}@ >> >> Also, drop the first space from line 49, I guess. >With your instructions I got PS1 and ^L just like I needed! For that I >thank you a lot. I think this makes everything almost perfect for me. >But there are a little things still bugging. Good to hear. Sure, but little things are often configurable ;) >First, if I type ^C the current line in the terminal will be >terminated and the new line will be prefixed with "130|" before PS1. >Is that intended? - is there a way to turn off? Yes, that is intended: if $? is != 0 then it will be displayed, and ^C creates SIGINT which is signal 2 on your system, and $? is set to the signal number plus 128. You could create a trap to avoid that: trap : INT Or you can remove the $?-printing code from PS1 altogether, that’s this line: (( e )) && REPLY+="$e|" >If I type ~<tab> it transforms ~ into /home/antoniv shouldn't it be >/home/antoniv/ ? With the finishing /? And like before is there a way >to keep it ~ without transformation? This one is just curiosity, >doesn't bug me too much. That’s unfortunately not possible (it was hard enough to get tab completion with tilde and “funny chars” in paths working as is). >In the end I'm enjoying mksh especially since it's so much "cleaner" >than other monsters ;) Thanks! Same here, by the way, I had a good base from which to start which was lean and working mostly well, and improved from there. >Thanks for it. You’re welcome! bye, //mirabilos -- „Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund, mksh auf jedem System zu installieren.“ -- XTaran auf der OpenRheinRuhr, ganz begeistert (EN: “[…]uhr.gz is a reason to install mksh on every system.”)