Project

General

Profile

Actions

Bug #13479

closed

/etc/ksh.kshrc prompt could work with set nounset

Added by Andy Fiddaman over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

The current /etc/ksh.kshrc file sets a prompt that gets a bit upset if the nounset shell option is enabled. It could handle this better.

d% ksh -u
/etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: /etc/ksh.kshrc: line 70: parameter not set
$
reaper% ksh
af@reaper:~$ set -u
ksh: line 5: ksh: line 5: : parameter not set
af@reaper:~$
ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: li: parameter not set
af@reaper:~$
ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: k: parameter not set
af@reaper:~$
ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: lin: parameter not set
af@reaper:~$
ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ks: parameter not set
af@reaper:~$
ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line 5: ksh: line: parameter not set
Actions #1

Updated by Robert Mustacchi over 2 years ago

  • Project changed from site to illumos gate
Actions #2

Updated by Andy Fiddaman over 2 years ago

  • Category set to cmd - userland programs
Actions #3

Updated by Andy Fiddaman over 2 years ago

  • Gerrit CR set to 1201
Actions #4

Updated by Andy Fiddaman over 2 years ago

  • Description updated (diff)
Actions #5

Updated by Andy Fiddaman over 2 years ago

Verified that ksh no longer complains when started with the -u/nounset option or when the option is set after startup:

bloody% ksh -u
af@bloody:~$ cd omniosorg/bloody/
af@bloody:~/omniosorg/bloody$
af@bloody:~/omniosorg/bloody$
bloody%
bloody% ksh
af@bloody:~$ cd omniosorg/bloody/
af@bloody:~/omniosorg/bloody$ set -o nounset
af@bloody:~/omniosorg/bloody$
af@bloody:~/omniosorg/bloody$
Actions #6

Updated by Electric Monk over 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 735d82f0eed0b47d38f86a63ede0e523c18eab09

commit  735d82f0eed0b47d38f86a63ede0e523c18eab09
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2021-02-08T15:34:27.000Z

    13479 /etc/ksh.kshrc prompt could work with set nounset
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF