[ 
https://issues.apache.org/jira/browse/DERBY-1447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836580#action_12836580
 ] 

Sylvain Leroux commented on DERBY-1447:
---------------------------------------

The total lack of editing capabilities in ij is really annoying.

To come back with a suggestion by John H. Embretsen above:
> I know that implementing this functionality in ij requires some more work, 
> but just adding a command line history should be easier than implementing 
> all the features provided by JLine

We could have just an history of the last few (all?) entered statements - and 
some kind of command to edit (and re-send) one of these statements using an 
external editor.

Something like that:
  ij> HISTORY;      -- display the history
     1   CONNECT 'jdbc:derby:dummy';
     2   CREATE TABLE T(A INT, B int);
     3   INSERT INTO T(a,b) VALUE (1, 2),
                    (3,4),
                    (5,6);
  ij> EDIT 2;       -- edit the second statement using an external editor.
                    -- Re-runs the statement after successfull edit


I'm not sure HISTORY and EDIT have to really  be "statements". I think they 
should be handled before reaching the ij parser.

Some command line utilities distinguish between "real" commands and 
pseudo-commands like that by using a special notation, like backslash-letter. 
It's a little bit esoteric, but could be an option to help the user remember 
those are "interactive commands", and such, couldn't/shouldn't appear in a 
batch script:
  ij> \h 
    1   CONNECT 'jdbc:derby:dummy';
     2   CREATE TABLE T(A INT, B int);
     3   INSERT INTO T(a,b) VALUE (1, 2),
                    (3,4),
                    (5,6);
  ij> \e 2


> add command line history to ij
> ------------------------------
>
>                 Key: DERBY-1447
>                 URL: https://issues.apache.org/jira/browse/DERBY-1447
>             Project: Derby
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Gary Orser
>            Priority: Minor
>         Attachments: jline-0_9_5.jar, jline.diff
>
>
> Using the command line tool 
> org.apache.derby.tools.ij
> is user unfriendly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to