You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Matthew Horsfall (alh) (JIRA)" <ji...@apache.org> on 2012/09/13 21:08:08 UTC

[jira] [Commented] (CASSANDRA-4666) Add multi-line support to cqlsh history buffer

    [ https://issues.apache.org/jira/browse/CASSANDRA-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455150#comment-13455150 ] 

Matthew Horsfall (alh) commented on CASSANDRA-4666:
---------------------------------------------------

A bit of interesting behaviour worth noting:

If you have a multi-line string as your last history line, and you hit the up arrow and then enter, it will not add it to the history again. This is intentional. However, if you type out the multi-line command that's already in your history, Python's readline module will re-record the lines that you typed so your multi-line command gets pushed back in the history.
                
> Add multi-line support to cqlsh history buffer
> ----------------------------------------------
>
>                 Key: CASSANDRA-4666
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4666
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Matthew Horsfall (alh)
>            Priority: Minor
>              Labels: newbie, patch
>             Fix For: 1.2.0
>
>         Attachments: trunk-4666.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The cqlsh tool has history support. If you press the up arrow, you get previous entries.
> If you do a multi-line command however like:
> {noformat}
>  cqlsh > do
> something;
> {noformat}
> when you press the up arrow you get each individual statement separately. (First "something;" and then "do").
> This is not useful if you type a large create statement and typo one of the pieces.
> It'd be nice if cqlsh supported multi-line history items and could bring them back with the up arrow.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira