[GHC] #13437: Easier editing of multi-line GHCi-commands
GHC
ghc-devs at haskell.org
Fri Mar 17 11:53:08 UTC 2017
#13437: Easier editing of multi-line GHCi-commands
-------------------------------------+-------------------------------------
Reporter: fredefox | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
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: |
-------------------------------------+-------------------------------------
Description changed by fredefox:
Old description:
> In my terminal emulator I can write something like:
>
> {{{
> cat > /dev/null << EOF
> bla
> bla
> bla
> EOF
> }}}
>
> If I later want to edit something in this command I can recall the
> command from history and I can navigate to the line I want to change. In
> GHCi this is not possible, the history only recalls *one line* at a time.
> It would be nice if it recognized commands entered using {{{ :{ ... }:
> }}} and would give you that whole command when recalling commands from
> the history.
>
> Also, it would be very handy if doing holding down a modifier key when
> hitting enter (e.g. Shift) would insert a newline into your multi-line
> command rather than run the command.
>
> Furthermore, it could also serve as a handy shortcut for engaging the
> multi-line command mode. So say you were sitting at the prompt {{{ > }}}
> and you then hit Shift+Enter, then GHCi moves to a new-line but has
> inserted the {{{ :{ }}} part for you, it could similarly close the
> command for you when you hit Enter (without holding down the modifier
> key).
>
> I believe this change would make GHCi's multi-line command mode way more
> useful. Currently I very seldomly (if ever) use GHCi for anything other
> than one-liners. This means that I usually have to edit the source-file
> I'm currently working on to put things into scope (or try and formulate a
> long and awkward expression).
New description:
In my terminal emulator I can write something like:
{{{
cat > /dev/null << EOF
bla
bla
bla
EOF
}}}
If I later want to edit something in this command I can recall the command
from history and I can navigate to the line I want to change. In GHCi this
is not possible, the history only recalls *one line* at a time. It would
be nice if it recognized commands entered using {{{ :{ ... }: }}} and
would give you that whole command when recalling commands from the
history.
Also, it would be very handy if holding down a modifier key when hitting
enter (e.g. Shift) would insert a newline into your multi-line command
rather than run the command.
Furthermore, it could also serve as a handy shortcut for engaging the
multi-line command mode. So say you were sitting at the prompt {{{ > }}}
and you then hit Shift+Enter, then GHCi moves to a new-line but has
inserted the {{{ :{ }}} part for you, it could similarly close the command
for you when you hit Enter (without holding down the modifier key).
I believe this change would make GHCi's multi-line command mode way more
useful. Currently I very seldomly (if ever) use GHCi for anything other
than one-liners. This means that I usually have to edit the source-file
I'm currently working on to put things into scope (or try and formulate a
long and awkward expression).
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13437#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list