Darren J Moffat wrote: > > Joseph Kowalski wrote: > > ## Part 1.8: Enable default prompt (PS1) for interactive shells > > The 1.8 portion of this project specifies to define a default prompt > > (PS1) in "/etc/ksh.kshrc" for interactive ksh93 shell sessions to > > improve end-user usabilty if the user did not specify a value for PS1 > > using the environment. The prompt should be set to a > > value which displays the username, hostname and current working directory > > (limited to 20 characters, if the CWD is longer than 20 characters > > the shell will display an ellipsis ("...") for the charcters omitted at the > > left side) and a "$ "-seperator for normal users and "# " with the login > > name "root" (this follows the default of SuSE Linux, Ubuntu and aims at > > improving the usalibity for novice unix users), e.g. setting the value of > > PS1 will result in the following prompt (for user "gisburn" on machine > > "jupiterb48" with CWD="/home/gisburn/solaris/"): > > -- snip -- > > gisburn at jupiterb48:~/solaris$ > > -- snip -- > > Notes: > > - /etc/ksh.kshrc will only set the prompt value if no value for PS1 > > exists yet > > - A user can override the value for PS1 in his/her own ${HOME}/.kshrc > > file (for interactive shells /etc/ksh.kshrc will be sourced first, > > followed by ${HOME}/.kshrc (see PSARC/2006/587)) > > - The change cannot be implemented in ksh93 itself because this would > > violate the standard > > It seems that this superceeds the ksh93 part of PSARC/2007/233 which > failed to gain approval before and was derailed.
Technically the derail was AFAIK for two reasons: - We had no usefull update procedure for "/etc/ksh.kshrc" and "/etc/bash.bashrc". We're getting such a thing with the /etc/env.d/ subproject of the OpenSolaris shell project which will allow setting both "vendor/factory" defaults and allow admins to override them for all users without running into problems with updates (the system is compatible to the new image package system (e.g. no file patching or scripts etc. required for updates)). - Everyone has his/her own preferences or ideas how PS1 may look like - which may require a "written opinion"[1]. For PSARC/2007/233 it was tricky since we tried to get a common prompt for all major shells in one step while this ARC case can happily "hide" behind PSARC/2006/587 where we said that the "/etc/ksh.kshrc" maintained by the ksh93-integration project is more or less a extension of the /usr/bin/$ISA/ksh93 binary itself (e.g. the POSIX standard doesn't allow to enable any shell flags (e.g. "gmacs" mode and in our case the "multiline" mode) by default but doesn't forbid this for external scripts which are read at shell startup time. Therefore /etc/ksh.kshrc allows us that the ksh93 binary itself fully conforms to the POSIX standard while getting some user-friendly defaults, too). [1]= I would really wish that we could avoid the whole mess with a "written opinion" (AFAIK this would be the first time for an external project to go through this). The proposed default for PS1 is modelled after the default used in Ubuntu+SuSE and the same as used in the Indiana Preview2 with a small twist that we limit the path length to 20 characters to make people happy who complain that the CWD may occupy most of their terminal width (not a big issue anymore since we now enable the "multiline" mode by default but AFAIK not everyone may be happy). > Something should be done with 2007/233 to reflect this. Erm... yes... originally I thought the cases were closed until Don reminded me that they're still half-alive and twitching... does anyone know what needs to be done in this case (e.g. add a comment which says "...the PS1 part for ksh93 was superceeded by PSARC/2008/094..." ?) ? ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;)