Opened 11 years ago

Closed 4 years ago

Last modified 4 years ago

#2531 closed feature request (fixed)

Prune duplicates in ghci history

Reported by: venkat Owned by:
Priority: lowest Milestone: 8.0.1
Component: GHCi Version: 6.8.3
Keywords: Cc: haskell.vivian.mcphail@…, hvr
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Documentation bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

When we enter the same expressions in ghci, all of them go in to history. It'd be useful to have an option to eliminate duplicate expressions before storing them in ghci history.

We can also consider doing this for storing ghci history as a file.

Change History (19)

comment:1 Changed 11 years ago by igloo

difficulty: Unknown
Milestone: 6.10 branch

comment:2 Changed 11 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:3 Changed 11 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:4 Changed 11 years ago by igloo

Milestone: 6.10 branch6.12 branch

comment:5 Changed 9 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:6 Changed 9 years ago by igloo

Milestone: 6.12.36.14.1
Priority: normallow

comment:7 Changed 9 years ago by vivian

Cc: haskell.vivian.mcphail@… added
Type of failure: None/Unknown

You can add the following line to your .haskeline file:

> historyDuplicates IgnoreConsecutive

or AlwaysAdd or IgnoreAll.

Right now the haskeline library reads all its preferences upon startup. The Prefs are in a ReaderT and so were presumably not designed to be updated during execution.

comment:8 Changed 9 years ago by igloo

Milestone: 7.0.17.0.2

comment:9 Changed 9 years ago by igloo

Milestone: 7.0.27.2.1

comment:10 Changed 8 years ago by igloo

Milestone: 7.2.17.4.1

comment:11 Changed 8 years ago by igloo

Milestone: 7.4.17.6.1
Priority: lowlowest

comment:12 Changed 7 years ago by igloo

Milestone: 7.6.17.6.2

comment:13 Changed 5 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:14 in reply to:  7 Changed 5 years ago by thomie

Cc: hvr added
Type of failure: None/UnknownDocumentation bug

Replying to vivian:

You can add the following line to your .haskeline file:

historyDuplicates: IgnoreConsecutive

or AlwaysAdd or IgnoreAll.

This could be added to the GHCi documentation. See also: http://trac.haskell.org/haskeline/wiki/UserPrefs

Last edited 5 years ago by thomie (previous) (diff)

comment:15 Changed 5 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:16 Changed 5 years ago by thoughtpolice

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:17 Changed 4 years ago by Thomas Miedema <thomasmiedema@…>

In b5a2e8763fcf0e2b4c57e12f2b2e5817e5ce9df0/ghc:

Documentation: add section on .haskeline file (#2531)

comment:18 Changed 4 years ago by thomie

Resolution: fixed
Status: newclosed

The user's guide now mentions that you can prune duplicates from GHCi's history by changing the .haskeline file, with a link to the Haskeline documentation. No need to reimplement this feature in GHCi.

comment:19 Changed 4 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

Note: See TracTickets for help on using tickets.