You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/10/07 12:43:43 UTC

[jira] [Commented] (KARAF-2503) Allow to limit the number of entries the history command remembers

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

Claus Ibsen commented on KARAF-2503:
------------------------------------

>From the karaf chat room today

[10:15:54] <davsclaus>	 is there a way in karaf to setup the number of entries the shell history remembers ?
[10:17:40] <jgoodyear>	 good question
[10:18:18] <davsclaus>	 the history command in the shell has only the --help option
[10:18:46] jgoodyear	 looking a the code, need a moment ;)
[10:18:49] <davsclaus>	 one reason asking is to be able to configure this, either in a etc file or from the shell, but in the etc would be lovely
[10:18:57] jgoodyear	 also need my coffee to kick in
[10:19:05] <davsclaus>	 and a 2nd reason is due security as some ppl dont want to expose the history
[10:19:18] davsclaus	 good idea, brewing time
[10:28:01] 	 ch007m2 (~cmoullia@ip-83-134-172-113.dsl.scarlet.be) left IRC. ("Leaving")
[10:33:43] <anierbeck>	 jgoodyear: :) longer days could be helpfull but only combined with less amount of sleep required ;)
[10:34:25] <anierbeck>	 davsclaus: hmm, I'm not sure but I think it's not configurable yet ...
[10:34:44] <anierbeck>	 davsclaus: +1 for a new requirement :)
[10:36:10] <davsclaus>	 yeah if its missing then would like to see that implement in karaf
[10:36:53] <jgoodyear>	 davsclaus: its just the JLine history lib
[10:37:05] <davsclaus>	 k
[10:37:14] <jgoodyear>	 davsclaus: didn't notice anything in there for setting file size or the like
[10:37:38] <davsclaus>	 oh maybe we can do limits in the shell command
[10:37:42] <davsclaus>	 eg when you type
[10:37:45] <davsclaus>	 historyt
[10:37:50] <anierbeck>	 jgoodyear: hmm, btw is this history shared by all users?
[10:37:52] <davsclaus>	 it can limit based on configured option
[10:38:06] <jgoodyear>	 anierbeck: appears so
[10:38:21] <jgoodyear>	 anierbeck: the history interface isn't very sophisticated
[10:38:33] <davsclaus>	 yeah it should ideally be per user and not shared, and a way to limit the length , and also be able to set it to 0 to turn it off
[10:38:41] <davsclaus>	 and maybe a history --clear to clear it
[10:38:50] <jgoodyear>	 clear per user
[10:39:04] <jgoodyear>	 userA should not be able to clear userB
[10:39:08] <davsclaus>	 yeah
[10:39:10] <jgoodyear>	 unless userA is Admin
[10:39:16] <davsclaus>	 but you may have a shared user account for ppl to use
[10:41:11] <anierbeck>	 davsclaus: which is OK, but the users shouldn't share the history ...
[10:41:23] <anierbeck>	 jgoodyear: ok, so this could need some bigger improvements then ...
[10:41:35] <jgoodyear>	 anierbeck: yes
[10:42:05] 	 cschneid1 (~Thunderb@b2b-92-50-84-158.unitymedia.biz) joined the channel.
[10:42:05] <jgoodyear>	 anierbeck:  that's not going to be so simple given the current impl
[10:42:44] <anierbeck>	 jgoodyear: I wouldn't have guessed it to be simple, since it's not implemented already :D
[10:43:50] <davsclaus>	 well 1st goal would be to limit the history size in some way
[10:43:56] <jgoodyear>	 yup
[10:43:58] <davsclaus>	 then 2nd goal could be clear / sharing history etc
[10:44:00] <anierbeck>	 davsclaus: yep
[10:44:14] jgoodyear	 third goal is obtain more coffee - brb
[10:44:28] <davsclaus>	 that would be a recurring goal :)

> Allow to limit the number of entries the history command remembers
> ------------------------------------------------------------------
>
>                 Key: KARAF-2503
>                 URL: https://issues.apache.org/jira/browse/KARAF-2503
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-shell
>    Affects Versions: 2.3.3
>            Reporter: Claus Ibsen
>
> The Karaf shell command remembers X number of entires back (jline history).
> It would be great if you could configure this in a configuration file in the etc, to have a upper limit how many entries is remembered.
> This applies when you use cursor up/down to scroll the history. As well when you type history in the shell to output the history stack.
> And it should be possible to disable the history, for example if you set the limit to 0 or -1 etc.



--
This message was sent by Atlassian JIRA
(v6.1#6144)