Looks like a custom TCL prompt is a cleaner approach.
Original Message:
Sent: 09-06-2023 20:57
From: Gregor Scott
Subject: Modify the system prompt '>'?
I created this from @Andy Baum's snippet.
* Setting the TCL prompt** Author: Gregor Scott* Date : 07-09-2023** Derived from a post in the Rocket Forum by Andy Baum, responding to the* thread "Re: Modify the system prompt '>'? " on 06-Aug-2023:*__________________________________________________________________________* You can use the undocumented ASSIGN and SYSTEM 4001 & 4002 * 4001 - 4002 Assign a string to TCL prompt, instead of single character:* STELPROMPT = @WHO : '>' ; * normal* STELPROMPT<2> = @WHO : '>>' ; select list active* STELPROMPT<3> = '+' ; multi-line command* ASSIGN 1 TO SYSTEM(4001)* ASSIGN STELPROMPT TO SYSTEM(4002) * We actually use* ASSIGN 1 TO SYSTEM(4001)* ASSIGN @(-13):@WHO:@(-14):' >':@FM:@(-13):@WHO:@(-14):' >>':@FM:'+' TO SYSTEM(4002)*__________________________________________________________________________*** SYNTAX: TCL.PROMPT SET [{value}]* TCL.PROMPT RESET** if {value} is not supplied with the SET command, then the* current @WHO value will be used.** First, get our command line options*get(arg.) the.CMD else the.CMD = ""b.SET = (upcase(the.CMD) = "SET")b.RESET = (upcase(the.CMD) = "RESET")if not(b.SET) and not(b.RESET) then crt "SYNTAX: TCL.PROMPT SET [{value}]" crt " TCL.PROMPT RESET" crt crt "The SET command assigns a custom string as the TCL prompt." crt "If {value} is not supplied then the current @WHO value is used." crt crt "The RESET command resets the prompt back to the system default." crt stopendbegin case case b.SET get(arg.) the.PROMPT else the.PROMPT = '' if len(the.PROMPT) = 0 then the.PROMPT = @WHO assign 1 to system(4001) assign @(-13):the.PROMPT:@(-14):' >':@AM:@(-13):the.PROMPT:@(-14):' >>':@AM:'+' to system(4002) case b.RESET assign 0 to system(4001)end casestop
On our UV 11.3.5 it produces an interesting result:

The "active select" prompt is using the UVPROMPT active select value and then showing the custom default text value.
It seems that the "undocumented" feature has been compromised in recent releases.
------------------------------
Gregor Scott
Software Architect
Pentana Solutions Pty Ltd
Mount Waverley VIC AU
Original Message:
Sent: 09-06-2023 02:45
From: Andy Baum
Subject: Modify the system prompt '>'?
You can use the undocumented ASSIGN and SYSTEM 4001 & 4002
4001 - 4002 Assign a string to TCL prompt, instead of single character:
STELPROMPT = @WHO : '>' ; * normal
STELPROMPT<2> = @WHO : '>>' ; select list active
STELPROMPT<3> = '+' ; multi-line command
ASSIGN 1 TO SYSTEM(4001)
ASSIGN STELPROMPT TO SYSTEM(4002)
We actually use
ASSIGN 1 TO SYSTEM(4001)
ASSIGN @(-13):@WHO:@(-14):' >':@FM:@(-13):@WHO:@(-14):' >>':@FM:'+' TO SYSTEM(4002)
------------------------------
Andy Baum
Senior Solutions Developer
DPD Group UK
Smethwick GB
Original Message:
Sent: 09-05-2023 15:03
From: Neil Morris
Subject: Modify the system prompt '>'?
Hi Jeff,
To my knowledge, the only thing directly available in UniVerse is the UVPROMPT command. This allows you to change the prompt character from the default ">". But you can only change a single character. There is no capability to change it to a string. So doing something las suggested by Marcus may be the best solution.
Thanks,
Neil
------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
Original Message:
Sent: 09-05-2023 13:34
From: Jeff Teter
Subject: Modify the system prompt '>'?
Working with a group of developers, I'd like to modify the system prompt in UniVerse from the standard '>' to include the account in which they are working. The 'WHO' command can give misleading results as it shows the folder in which they are running which may or may not be the UniVerse account. For instance, my developers each have a folder that contains the various accounts that they need for testing and source control. An example might be '/bl1/DEV_ABC/COM' and the 'WHO' command returns 'COM' but the UV.ACCOUNT record for this path is 'COM_ABC'. So, I'd like to modify the system prompt to show 'COM_ABC>'. I would assume that this could be set either in the 'LOGIN' script or in 'UV.LOGIN'. That will provide a visual cue that they are not in a production account. So far, searching the documentation has not produced an answer.
TIA!
------------------------------
Jeff Teter
Woodforest National Bank
The Woodlands, TX
------------------------------