Opened 3 years ago

Closed 2 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):

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 2 years ago by igloo

  • Description modified (diff)
  • difficulty set to Unknown

comment:2 Changed 2 years ago by igloo

  • Milestone set to 7.8.1
  • Owner set to igloo

Thanks for the suggestion.

comment:3 Changed 2 years ago by igloo

See also #7618.

Changed 2 years ago by usrbincc

comment:4 Changed 2 years ago by usrbincc

  • Status changed from new to patch

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 2 years ago by igloo

  • Resolution set to fixed
  • Status changed from patch to closed

All applied, thanks!

Note: See TracTickets for help on using tickets.