[GHC] #9089: Local .ghci_history

#9089: Local .ghci_history ------------------------------------+------------------------------------- Reporter: jcristovao | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.8.2 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- Hello, It would be nice to allow a local .ghci_history to be used (when available) instead of the global .ghc/ghci_history. This would be similar in behaviour to the .ghci rules: http://www.haskell.org/ghc/docs/7.8.2/html/users_guide/ghci-dot-files.html And I believe this should not be too complicated to do (I can even try it myself, if there is interest). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------ Reporter: jcristovao | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by jcristovao): I've added a diff showing a very simple implementation of this. I've only included code, not the corresponding documentation patch, but I can also do that, of course. What do you think? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------ Reporter: jcristovao | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by nsch): * cc: nsch (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------ Reporter: jcristovao | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: GHCi | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by jcristovao): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------ Reporter: jcristovao | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: GHCi | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by rwbarton): This kind of diff with no context is hard to read and in danger of getting out of date with upstream. Can you attach a diff produced by `git diff` or, failing that, at least with `diff -u`? (I think the attached diff is backwards, too.) Also, a documentation patch would be helpful. It's somewhat less obvious how I'm supposed to use a local .ghci_history file than a local .ghci file, since a .ghci file is written by the user, but a .ghci_history is (usually) produced by .ghci. Am I supposed to just create an empty .ghci_history file in the directory where I want to use local history? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------ Reporter: jcristovao | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by thomie): * status: patch => new -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------ Reporter: jcristovao | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by jcristovao): I am so sorry about this... I should have checked the diff, it was almost useless. Attached is a proper diff (I hope).
Am I supposed to just create an empty .ghci_history file in the directory where I want to use local history?
Yes, that is basically it. Just as you need to create a local .ghci file when you want one. The other alternative would be a command line option, but this seems simpler. What do you think? When we reach an agreement, I'll add the documentation patch. Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------ Reporter: jcristovao | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: GHCi | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by jcristovao): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------- Reporter: jcristovao | Owner: Type: feature | Status: patch request | Milestone: Priority: normal | Version: 7.8.2 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by joe9mail): I would love to have this feature. Thanks a lot for adding it in. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------- Reporter: jcristovao | Owner: Type: feature | Status: infoneeded request | Milestone: 7.10.1 Priority: normal | Version: 7.8.2 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => infoneeded * milestone: => 7.10.1 Comment: I'm +1 on this feature, but I personally think this should have a command line flag, for example, `ghc --interactive --local-ghci-history`, perhaps with a short-name if one is sensible. This is much easier for users to understand (e.g. they can look at `man ghc` to find it) I think. Please also update the documentation and I'll get to this - thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------- Reporter: jcristovao | Owner: Type: feature | Status: infoneeded request | Milestone: 7.10.1 Priority: normal | Version: 7.8.2 Component: GHCi | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by ibotty): * cc: ibotty (added) Comment: i would also prefer a command-line option (and make it cabal repl's default). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------- Reporter: jcristovao | Owner: ak3n Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by ak3n): * owner: => ak3n -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history -------------------------------------+------------------------------------- Reporter: jcristovao | Owner: ak3n Type: feature request | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2461 Wiki Page: | -------------------------------------+------------------------------------- Changes (by ak3n): * differential: => Phab:D2461 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history
-------------------------------------+-------------------------------------
Reporter: jcristovao | Owner: ak3n
Type: feature request | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 7.8.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2461
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#9089: Local .ghci_history -------------------------------------+------------------------------------- Reporter: jcristovao | Owner: ak3n Type: feature request | Status: closed Priority: normal | Milestone: 8.2.1 Component: GHCi | Version: 7.8.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2461 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.2.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9089#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9089: Local .ghci_history
-------------------------------------+-------------------------------------
Reporter: jcristovao | Owner: ak3n
Type: feature request | Status: closed
Priority: normal | Milestone: 8.2.1
Component: GHCi | Version: 7.8.2
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2461
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott
participants (1)
-
GHC