*Synopsis*: ksh93 has strange default PS1

CR 6913851 changed on Jan 5 2010 by <User 1-5Q-1267>

=== Field ============ === New Value ============= === Old Value =============

Public Comments        New Note                                               
====================== =========================== ===========================

     
*Change Request ID*: 6913851

*Synopsis*: ksh93 has strange default PS1

  Product: solaris
  Category: shell
  Subcategory: korn93
  Type: Defect
  Subtype: 
  Status: 1-Dispatched
  Substatus: 
  Priority: 4-Low
  Introduced In Release: 
  Introduced In Build: 
  Responsible Engineer: 
  Keywords: 

=== *Description* ============================================================
$ env - ksh93
$ echo $PS1                                   
%s" COLUMNS "" printf "%...@%s:" "${LOGNAME}" "$(/usr/bin/hostname)" ellip="${ 
[[ "${LC_ALL}/${LANG}" == ~(Elr)(.*UTF-8/.*|/.*UTF-8) ]] && printf "\u[2026]
" || print "..." ; }" p="${PWD/~(El)${HOME}/\~}" (( ${#p} > 30 )) && print -r 
-n -- "${ellip}${p:${#p}-30:30}" || print -r -n -- "${p}" [[ "${LOGNAME}" == 
"root" ]] && print -n "# " || print -n "\$ " )

$ set | grep PS1                              
PS1=$'$(set +o xtrace +o errexit\n                printf "%*s\\r%s" COLUMNS 
""\n                printf "%...@%s:" "${LOGNAME}" 
"$(/usr/bin/hostname)"\n\t\tellip="${\n\t\t\t[[ "${LC_ALL}/${LANG}" == 
~(Elr)(.*UTF-8/.*|/.*UTF-8) ]] &&\n\t\t\t\tprintf "\\u[2026]\\n" || print "..." 
; }"\n\t\tp="${PWD/~(El)${HOME}/\\~}"\n\t\t(( ${#p} > 30 )) &&\n\t\t\tprint -r 
-n -- "${ellip}${p:${#p}-30:30}" ||\n\t\t\tprint -r -n -- "${p}"\n\t\t[[ 
"${LOGNAME}" == "root" ]] && print -n "# " || print -n "\\$ "\n\t\t)'

$ uname -a
SunOS xylabtecra 5.11 snv_130 i86pc i386 i86pc

With LOGNAME not set:

@xylabtecra:~/export/home/mj162486

*** (#1 of 1): 2010-01-04 09:29:04 GMT+00:00 <User 1-1SURPB>


=== *Public Comments* ========================================================
OpenSolaris ksh93 project lead Roland Mainz says:

The PS1 value reported in this bug is set in /etc/ksh.kshrc to provide
an user-friendly machine-wide default (see PSARC 2006/587). ksh93 itself
defaults to '$ ' as defined in the standard (using /etc/ksh.kshrc to set
PS1 allows us to both be standard-conformant and be user-friendly...  :-) 
).

Or short: This is not a bug.

*** (#1 of 1): 2010-01-05 03:37:41 GMT+00:00 <User 1-5Q-1267>


=== *Workaround* =============================================================

=== *Additional Details* =====================================================
        Targeted Release: 
        Commit To Fix In Build: 
        Fixed In Build: 
        Integrated In Build: 
        Verified In Build: 
  See Also: 6913823
  Duplicate of: 
  Hooks:
        Hook1: 
        Hook2: 
        Hook3: 
        Hook4: 
        Hook5: 
        Hook6: 
  Program Management: 
  Root Cause: 
  Fix Affects Documentation: No
  Fix Affects Localization: No

=== *History* ================================================================
        Date Submitted: 2010-01-04 09:29:03 GMT+00:00
        Submitted By: <User 1-1SURPB>

        Status Changed    Date Updated                  Updated By


=== *Service Request* ========================================================
        Impact: Limited
        Functionality: Primary
        Severity: 3
        Product Name: solaris
        Product Release: osol_2009.06
        Product Build: osol_2009.06
        Operating System: snv_130
        Hardware: x86
        Submitted Date: 2010-01-04 09:29:04 GMT+00:00


=== *Multiple Release (MR) Cluster* - 0 ======================================

Reply via email to