Opened 5 years ago

Closed 4 years ago

#7509 closed feature request (fixed)

Changing the second prompt. :{ modules| No setting available to change.

Reported by: m30w Owned by: igloo
Priority: normal Milestone: 7.8.1
Component: Compiler Version: 7.6.1
Keywords: ghci second prompt setting set configuration conf config Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by igloo)

In order to change the main prompt it's as simple as a single command.

:set prompt "> "

However, in order to change the second prompt, you'd have to go into the ghci source code, and remove code or wrap existing code to add a switch/configuration for it.


> :{

As of the reason to having a configurable prompt, when you have many modules, this list can become annoying fast and so many have disabled showing the modules. Yet we can't do this with the second prompt.

Attachments (3)

Change History (8)

comment:1 Changed 5 years ago by igloo

Description: modified (diff)
difficulty: Unknown

comment:2 Changed 5 years ago by igloo

Milestone: 7.8.1
Owner: set to igloo

Thanks for the suggestion.

comment:3 Changed 5 years ago by igloo

See also #7618.

Changed 4 years ago by usrbincc

comment:4 Changed 4 years ago by usrbincc

Status: newpatch

This patch adds a prompt2 setting to ghci such that :set prompt2 "prompt> " will set the continuation prompt. I named it prompt2 in order to mirror the naming of PS1 and PS2 for prompt and continuation prompt in bash, but will understand if others consider the naming cryptic.

comment:5 Changed 4 years ago by igloo

Resolution: fixed
Status: patchclosed

All applied, thanks!

Note: See TracTickets for help on using tickets.