You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@artemis.apache.org by Clebert Suconic <cl...@gmail.com> on 2026/03/14 18:23:10 UTC

[DISCUSS] Default History on Shell

I am adding the possibility to enable a history of commands on ./artemis shell


Currently I'm enabling this as optional, as you would have to do:

./artemis shell --history my-file.txt



you can see the PR at https://github.com/apache/artemis/pull/6297 ..
.as it's pretty simple.



The question I have is if I should use a default file (or even allow
having a default file)?

if I allowed a default file, where should we keep it?


The issue why I didn't do it automatically is if people used things like:

Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert --password=mypassword


Such thing would be on the history file.




Opt in is of course a non issue as the file would be clearly managed
by the user.


-- 
Clebert Suconic

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Clebert Suconic <cl...@gmail.com>.
Having a ${HOME}/some-file-name would definitely be my choice.

Having a single history for all the instances could be a feature and
not a bug though (some users may prefer it).

I could have this variable defined in artemis-utility.profile:

ARTEMIS_HISTORY_FILE=${HOME}/.artemis.hst


And uses would be able to make it individual if they prefer individual history.



The other option is to leave that default commented out and users
would be able uncomment such line if they want to enable the feature.

On Thu, Apr 16, 2026 at 1:42 AM Domenico Francesco Bruscino
<br...@gmail.com> wrote:
>
> Utilizing "${HOME}/.some-file-name" effectively segregates commands
> per user. We could also include a hash of the Artemis home/instance
> path in the filename to support independent command histories for
> multiple instances.
>
> Domenico
>
> On Wed, 15 Apr 2026 at 19:33, Arthur Naseef <ar...@amlinv.com> wrote:
> >
> > "${HOME}/.some-file-name" is a unix/linux standard for saving user-specific
> > settings for programs.  That plays well with files starting with '.' being
> > treated as hidden.  I personally would make "${HOME}/.artemis-history" the
> > default.
> >
> > Another consideration - do we want to make the file a shared one?  One
> > concern with placing the file is under "${ARTEMIS_INSTANCE}/" is that users
> > must have permissions to those folders to read and write the history file.
> >
> > Art
> >
> >
> > On Thu, Apr 9, 2026 at 4:13 PM Clebert Suconic <cl...@gmail.com>
> > wrote:
> >
> > > I guess on bash it's different, as it's always save on $HOME/.bashHistory
> > >
> > >
> > > not sure we can allow the same thing here...
> > >
> > > I can add a SYSTEM Variable, and print a tip on what to do when not
> > > defined.
> > >
> > > On Thu, Apr 9, 2026 at 4:33 PM Arthur Naseef <ar...@apache.org> wrote:
> > > >
> > > > Ahh, I see it now.  I was actually just running out of the ARTEMIS_HOME;
> > > > creating an instance and then running it from there I get the prompt.
> > > >
> > > > My 2cents on this - the prompt is OK, especially for a "start a shell"
> > > > command.  I guess what it's coming down to for me here - asking myself is
> > > > it "real obvious?"  The prompt is obvious, but then the creation of the
> > > > etc/history-file after saying "n" maybe not so much.  And if I answer "n"
> > > > and then change my mind (maybe because I hit "n" by accident), then it's
> > > > not obvious that I need to rm etc/history-file to get prompted again.
> > > >
> > > > If we followed the pattern of a well-known example, like bash, then it's
> > > > easier to reach "real obvious" state.
> > > >
> > > > Does this help?
> > > >
> > > > Art
> > > >
> > > >
> > > >
> > > > On Thu, Apr 9, 2026 at 1:07 PM Justin Bertram <jb...@apache.org>
> > > wrote:
> > > >
> > > > > When you first start the shell in an instance directory it will ask
> > > > > you if you want to record command history to a file. If you answer
> > > > > "no" then it will create an etc/history-file with "NO_HISTORY" in it
> > > > > so it doesn't ask you every time. My guess is that you have that file
> > > > > in your instance's etc directory.
> > > > >
> > > > >
> > > > > Justin
> > > > >
> > > > > On Thu, Apr 9, 2026 at 3:00 PM Arthur Naseef <ar...@apache.org>
> > > wrote:
> > > > > >
> > > > > > This is what I get; am I missing something?
> > > > > >
> > > > > > $ ./artemis
> > > > > >      _        _               _
> > > > > >     / \  ____| |_  ___ __  __(_) _____
> > > > > >    / _ \|  _ \ __|/ _ \  \/  | |/  __/
> > > > > >   / ___ \ | \/ |_/  __/ |\/| | |\___ \
> > > > > >  /_/   \_\|   \__\____|_|  |_|_|/___ /
> > > > > >  Apache Artemis 2.54.0-SNAPSHOT
> > > > > >
> > > > > >
> > > > > >
> > > > > > For a list of commands, type help or press <TAB>:
> > > > > > Type exit or press <CTRL-D> to leave the session:
> > > > > > Apache Artemis 2.54.0-SNAPSHOT >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, Apr 9, 2026 at 11:09 AM Clebert Suconic <
> > > > > clebert.suconic@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > > > If you call just ./artemis. It will ask if you would allow it.
> > > > > > >
> > > > > > > Clebert Suconic
> > > > > > >
> > > > > > >
> > > > > > > On Wed, Apr 8, 2026 at 6:00 PM Arthur Naseef <artnaseef@apache.org
> > > >
> > > > > wrote:
> > > > > > >
> > > > > > > > @Clebert Suconic <cl...@gmail.com> I tested with shell
> > > > > > > --history
> > > > > > > > "${HOME}/.artemis-history".  It works as I would expect.  Nice.
> > > > > Because
> > > > > > > > typing that out more than once could get tedious and
> > > error-prone, I
> > > > > > > > personally would make a helper (either a simple script in
> > > $HOME/bin,
> > > > > or
> > > > > > > an
> > > > > > > > alias).
> > > > > > > >
> > > > > > > > It would be really nice to have the environment variable too.
> > > Then
> > > > > I put
> > > > > > > > it in my .bashrc, or equivalent, and forget about it until I go
> > > to a
> > > > > new
> > > > > > > > machine, where I rinse-and-repeat.
> > > > > > > >
> > > > > > > > Hope this helps.
> > > > > > > >
> > > > > > > > Art
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Fri, Mar 20, 2026 at 2:58 PM Clebert Suconic <
> > > > > > > clebert.suconic@gmail.com
> > > > > > > > >
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > @arthur I already made this into the last release. Let me know
> > > > > what you
> > > > > > > > > think ?
> > > > > > > > >
> > > > > > > > > Clebert Suconic
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <
> > > > > artnaseef@apache.org>
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > I like the idea.  A command-line argument works.
> > > Personally, at
> > > > > > > least
> > > > > > > > on
> > > > > > > > > > my linux machine, I would prefer to use environment
> > > variables,
> > > > > akin
> > > > > > > to
> > > > > > > > > > those used by bash.
> > > > > > > > > >
> > > > > > > > > > For example, ARTEMIS_HISTORY_FILE.
> > > > > > > > > >
> > > > > > > > > > As for a default, I would argue that we don't enable by
> > > default.
> > > > > > > For a
> > > > > > > > > > default filename - again coming from a Linux background - I
> > > like
> > > > > > > > > > ${HOME}/.artemis-history or similar (note the leading dot to
> > > > > make it
> > > > > > > > > > hidden).
> > > > > > > > > >
> > > > > > > > > > WIth all of that said, I personally would probably prefer to
> > > > > just use
> > > > > > > > > > 1-liners from the bash shell directly and not use the artemis
> > > > > shell
> > > > > > > > > command
> > > > > > > > > > itself, so take that all with a grain of salt.
> > > > > > > > > >
> > > > > > > > > > On the idea of prompting - again Linux background here - I
> > > don't
> > > > > > > prefer
> > > > > > > > > > scripts stopping to prompt for input unless I specifically
> > > ask
> > > > > them
> > > > > > > to
> > > > > > > > do
> > > > > > > > > > so.
> > > > > > > > > >
> > > > > > > > > > Art
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> > > > > > > > > > clebert.suconic@gmail.com>
> > > > > > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > I meant to say.. inputPassword already does not save
> > > anything.
> > > > > > > > > > >
> > > > > > > > > > > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > > > > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > The inputPassword does not echo anything.
> > > > > > > > > > > >
> > > > > > > > > > > > I am now asking for an input ("do you want to enable
> > > history
> > > > > on
> > > > > > > the
> > > > > > > > > > > > shell") the first time the shell is executed.
> > > > > > > > > > > >
> > > > > > > > > > > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > > > > > > > > > > <ro...@gmail.com> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > I would keep things simpler and just stick to
> > > providing it
> > > > > if
> > > > > > > you
> > > > > > > > > > want
> > > > > > > > > > > > > it, or not having it at all.
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > > > > > > > > > > clebert.suconic@gmail.com> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Just thought about an idea...
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I can ask the prompt at the first time the shell is
> > > > > running:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > - do you want to persist the history of commands?
> > > (Y/N)
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > if Y:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I will print a message at the start of the shell,
> > > saying
> > > > > that
> > > > > > > > > > history
> > > > > > > > > > > > > > of commands in this shell is preserved at
> > > (file-path-TBD)
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > > > > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I am adding the possibility to enable a history of
> > > > > commands
> > > > > > > > on
> > > > > > > > > > > ./artemis shell
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Currently I'm enabling this as optional, as you
> > > would
> > > > > have
> > > > > > > to
> > > > > > > > > do:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > ./artemis shell --history my-file.txt
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > you can see the PR at
> > > > > > > > > > https://github.com/apache/artemis/pull/6297
> > > > > > > > > > > ..
> > > > > > > > > > > > > > > .as it's pretty simple.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > The question I have is if I should use a default
> > > file
> > > > > (or
> > > > > > > > even
> > > > > > > > > > > allow
> > > > > > > > > > > > > > > having a default file)?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > if I allowed a default file, where should we keep
> > > it?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > The issue why I didn't do it automatically is if
> > > people
> > > > > > > used
> > > > > > > > > > > things like:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect
> > > --user=clebert
> > > > > > > > > > > --password=mypassword
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Such thing would be on the history file.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Opt in is of course a non issue as the file would
> > > be
> > > > > > > clearly
> > > > > > > > > > > managed
> > > > > > > > > > > > > > > by the user.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > --
> > > > > > > > > > > > > > > Clebert Suconic
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --
> > > > > > > > > > > > > > Clebert Suconic
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > >
> > > > > ---------------------------------------------------------------------
> > > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > > dev-unsubscribe@artemis.apache.org
> > > > > > > > > > > > > > For additional commands, e-mail:
> > > > > dev-help@artemis.apache.org
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > >
> > > > > ---------------------------------------------------------------------
> > > > > > > > > > > > > To unsubscribe, e-mail:
> > > dev-unsubscribe@artemis.apache.org
> > > > > > > > > > > > > For additional commands, e-mail:
> > > > > dev-help@artemis.apache.org
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > Clebert Suconic
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Clebert Suconic
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > dev-help@artemis.apache.org
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > >
> > > > >
> > >
> > >
> > >
> > > --
> > > Clebert Suconic
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > For additional commands, e-mail: dev-help@artemis.apache.org
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> For additional commands, e-mail: dev-help@artemis.apache.org
>


-- 
Clebert Suconic

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Domenico Francesco Bruscino <br...@gmail.com>.
Utilizing "${HOME}/.some-file-name" effectively segregates commands
per user. We could also include a hash of the Artemis home/instance
path in the filename to support independent command histories for
multiple instances.

Domenico

On Wed, 15 Apr 2026 at 19:33, Arthur Naseef <ar...@amlinv.com> wrote:
>
> "${HOME}/.some-file-name" is a unix/linux standard for saving user-specific
> settings for programs.  That plays well with files starting with '.' being
> treated as hidden.  I personally would make "${HOME}/.artemis-history" the
> default.
>
> Another consideration - do we want to make the file a shared one?  One
> concern with placing the file is under "${ARTEMIS_INSTANCE}/" is that users
> must have permissions to those folders to read and write the history file.
>
> Art
>
>
> On Thu, Apr 9, 2026 at 4:13 PM Clebert Suconic <cl...@gmail.com>
> wrote:
>
> > I guess on bash it's different, as it's always save on $HOME/.bashHistory
> >
> >
> > not sure we can allow the same thing here...
> >
> > I can add a SYSTEM Variable, and print a tip on what to do when not
> > defined.
> >
> > On Thu, Apr 9, 2026 at 4:33 PM Arthur Naseef <ar...@apache.org> wrote:
> > >
> > > Ahh, I see it now.  I was actually just running out of the ARTEMIS_HOME;
> > > creating an instance and then running it from there I get the prompt.
> > >
> > > My 2cents on this - the prompt is OK, especially for a "start a shell"
> > > command.  I guess what it's coming down to for me here - asking myself is
> > > it "real obvious?"  The prompt is obvious, but then the creation of the
> > > etc/history-file after saying "n" maybe not so much.  And if I answer "n"
> > > and then change my mind (maybe because I hit "n" by accident), then it's
> > > not obvious that I need to rm etc/history-file to get prompted again.
> > >
> > > If we followed the pattern of a well-known example, like bash, then it's
> > > easier to reach "real obvious" state.
> > >
> > > Does this help?
> > >
> > > Art
> > >
> > >
> > >
> > > On Thu, Apr 9, 2026 at 1:07 PM Justin Bertram <jb...@apache.org>
> > wrote:
> > >
> > > > When you first start the shell in an instance directory it will ask
> > > > you if you want to record command history to a file. If you answer
> > > > "no" then it will create an etc/history-file with "NO_HISTORY" in it
> > > > so it doesn't ask you every time. My guess is that you have that file
> > > > in your instance's etc directory.
> > > >
> > > >
> > > > Justin
> > > >
> > > > On Thu, Apr 9, 2026 at 3:00 PM Arthur Naseef <ar...@apache.org>
> > wrote:
> > > > >
> > > > > This is what I get; am I missing something?
> > > > >
> > > > > $ ./artemis
> > > > >      _        _               _
> > > > >     / \  ____| |_  ___ __  __(_) _____
> > > > >    / _ \|  _ \ __|/ _ \  \/  | |/  __/
> > > > >   / ___ \ | \/ |_/  __/ |\/| | |\___ \
> > > > >  /_/   \_\|   \__\____|_|  |_|_|/___ /
> > > > >  Apache Artemis 2.54.0-SNAPSHOT
> > > > >
> > > > >
> > > > >
> > > > > For a list of commands, type help or press <TAB>:
> > > > > Type exit or press <CTRL-D> to leave the session:
> > > > > Apache Artemis 2.54.0-SNAPSHOT >
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Apr 9, 2026 at 11:09 AM Clebert Suconic <
> > > > clebert.suconic@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > If you call just ./artemis. It will ask if you would allow it.
> > > > > >
> > > > > > Clebert Suconic
> > > > > >
> > > > > >
> > > > > > On Wed, Apr 8, 2026 at 6:00 PM Arthur Naseef <artnaseef@apache.org
> > >
> > > > wrote:
> > > > > >
> > > > > > > @Clebert Suconic <cl...@gmail.com> I tested with shell
> > > > > > --history
> > > > > > > "${HOME}/.artemis-history".  It works as I would expect.  Nice.
> > > > Because
> > > > > > > typing that out more than once could get tedious and
> > error-prone, I
> > > > > > > personally would make a helper (either a simple script in
> > $HOME/bin,
> > > > or
> > > > > > an
> > > > > > > alias).
> > > > > > >
> > > > > > > It would be really nice to have the environment variable too.
> > Then
> > > > I put
> > > > > > > it in my .bashrc, or equivalent, and forget about it until I go
> > to a
> > > > new
> > > > > > > machine, where I rinse-and-repeat.
> > > > > > >
> > > > > > > Hope this helps.
> > > > > > >
> > > > > > > Art
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Fri, Mar 20, 2026 at 2:58 PM Clebert Suconic <
> > > > > > clebert.suconic@gmail.com
> > > > > > > >
> > > > > > > wrote:
> > > > > > >
> > > > > > > > @arthur I already made this into the last release. Let me know
> > > > what you
> > > > > > > > think ?
> > > > > > > >
> > > > > > > > Clebert Suconic
> > > > > > > >
> > > > > > > >
> > > > > > > > On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <
> > > > artnaseef@apache.org>
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > I like the idea.  A command-line argument works.
> > Personally, at
> > > > > > least
> > > > > > > on
> > > > > > > > > my linux machine, I would prefer to use environment
> > variables,
> > > > akin
> > > > > > to
> > > > > > > > > those used by bash.
> > > > > > > > >
> > > > > > > > > For example, ARTEMIS_HISTORY_FILE.
> > > > > > > > >
> > > > > > > > > As for a default, I would argue that we don't enable by
> > default.
> > > > > > For a
> > > > > > > > > default filename - again coming from a Linux background - I
> > like
> > > > > > > > > ${HOME}/.artemis-history or similar (note the leading dot to
> > > > make it
> > > > > > > > > hidden).
> > > > > > > > >
> > > > > > > > > WIth all of that said, I personally would probably prefer to
> > > > just use
> > > > > > > > > 1-liners from the bash shell directly and not use the artemis
> > > > shell
> > > > > > > > command
> > > > > > > > > itself, so take that all with a grain of salt.
> > > > > > > > >
> > > > > > > > > On the idea of prompting - again Linux background here - I
> > don't
> > > > > > prefer
> > > > > > > > > scripts stopping to prompt for input unless I specifically
> > ask
> > > > them
> > > > > > to
> > > > > > > do
> > > > > > > > > so.
> > > > > > > > >
> > > > > > > > > Art
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> > > > > > > > > clebert.suconic@gmail.com>
> > > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > > I meant to say.. inputPassword already does not save
> > anything.
> > > > > > > > > >
> > > > > > > > > > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > > > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > The inputPassword does not echo anything.
> > > > > > > > > > >
> > > > > > > > > > > I am now asking for an input ("do you want to enable
> > history
> > > > on
> > > > > > the
> > > > > > > > > > > shell") the first time the shell is executed.
> > > > > > > > > > >
> > > > > > > > > > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > > > > > > > > > <ro...@gmail.com> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > I would keep things simpler and just stick to
> > providing it
> > > > if
> > > > > > you
> > > > > > > > > want
> > > > > > > > > > > > it, or not having it at all.
> > > > > > > > > > > >
> > > > > > > > > > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > > > > > > > > > clebert.suconic@gmail.com> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Just thought about an idea...
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > I can ask the prompt at the first time the shell is
> > > > running:
> > > > > > > > > > > > >
> > > > > > > > > > > > > - do you want to persist the history of commands?
> > (Y/N)
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > if Y:
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > I will print a message at the start of the shell,
> > saying
> > > > that
> > > > > > > > > history
> > > > > > > > > > > > > of commands in this shell is preserved at
> > (file-path-TBD)
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > > > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I am adding the possibility to enable a history of
> > > > commands
> > > > > > > on
> > > > > > > > > > ./artemis shell
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Currently I'm enabling this as optional, as you
> > would
> > > > have
> > > > > > to
> > > > > > > > do:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > ./artemis shell --history my-file.txt
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > you can see the PR at
> > > > > > > > > https://github.com/apache/artemis/pull/6297
> > > > > > > > > > ..
> > > > > > > > > > > > > > .as it's pretty simple.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > The question I have is if I should use a default
> > file
> > > > (or
> > > > > > > even
> > > > > > > > > > allow
> > > > > > > > > > > > > > having a default file)?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > if I allowed a default file, where should we keep
> > it?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > The issue why I didn't do it automatically is if
> > people
> > > > > > used
> > > > > > > > > > things like:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect
> > --user=clebert
> > > > > > > > > > --password=mypassword
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Such thing would be on the history file.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Opt in is of course a non issue as the file would
> > be
> > > > > > clearly
> > > > > > > > > > managed
> > > > > > > > > > > > > > by the user.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --
> > > > > > > > > > > > > > Clebert Suconic
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > --
> > > > > > > > > > > > > Clebert Suconic
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > > > > > > To unsubscribe, e-mail:
> > > > dev-unsubscribe@artemis.apache.org
> > > > > > > > > > > > > For additional commands, e-mail:
> > > > dev-help@artemis.apache.org
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > > > > > To unsubscribe, e-mail:
> > dev-unsubscribe@artemis.apache.org
> > > > > > > > > > > > For additional commands, e-mail:
> > > > dev-help@artemis.apache.org
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Clebert Suconic
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Clebert Suconic
> > > > > > > > > >
> > > > > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > dev-help@artemis.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > >
> > > >
> >
> >
> >
> > --
> > Clebert Suconic
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > For additional commands, e-mail: dev-help@artemis.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Arthur Naseef <ar...@amlinv.com>.
"${HOME}/.some-file-name" is a unix/linux standard for saving user-specific
settings for programs.  That plays well with files starting with '.' being
treated as hidden.  I personally would make "${HOME}/.artemis-history" the
default.

Another consideration - do we want to make the file a shared one?  One
concern with placing the file is under "${ARTEMIS_INSTANCE}/" is that users
must have permissions to those folders to read and write the history file.

Art


On Thu, Apr 9, 2026 at 4:13 PM Clebert Suconic <cl...@gmail.com>
wrote:

> I guess on bash it's different, as it's always save on $HOME/.bashHistory
>
>
> not sure we can allow the same thing here...
>
> I can add a SYSTEM Variable, and print a tip on what to do when not
> defined.
>
> On Thu, Apr 9, 2026 at 4:33 PM Arthur Naseef <ar...@apache.org> wrote:
> >
> > Ahh, I see it now.  I was actually just running out of the ARTEMIS_HOME;
> > creating an instance and then running it from there I get the prompt.
> >
> > My 2cents on this - the prompt is OK, especially for a "start a shell"
> > command.  I guess what it's coming down to for me here - asking myself is
> > it "real obvious?"  The prompt is obvious, but then the creation of the
> > etc/history-file after saying "n" maybe not so much.  And if I answer "n"
> > and then change my mind (maybe because I hit "n" by accident), then it's
> > not obvious that I need to rm etc/history-file to get prompted again.
> >
> > If we followed the pattern of a well-known example, like bash, then it's
> > easier to reach "real obvious" state.
> >
> > Does this help?
> >
> > Art
> >
> >
> >
> > On Thu, Apr 9, 2026 at 1:07 PM Justin Bertram <jb...@apache.org>
> wrote:
> >
> > > When you first start the shell in an instance directory it will ask
> > > you if you want to record command history to a file. If you answer
> > > "no" then it will create an etc/history-file with "NO_HISTORY" in it
> > > so it doesn't ask you every time. My guess is that you have that file
> > > in your instance's etc directory.
> > >
> > >
> > > Justin
> > >
> > > On Thu, Apr 9, 2026 at 3:00 PM Arthur Naseef <ar...@apache.org>
> wrote:
> > > >
> > > > This is what I get; am I missing something?
> > > >
> > > > $ ./artemis
> > > >      _        _               _
> > > >     / \  ____| |_  ___ __  __(_) _____
> > > >    / _ \|  _ \ __|/ _ \  \/  | |/  __/
> > > >   / ___ \ | \/ |_/  __/ |\/| | |\___ \
> > > >  /_/   \_\|   \__\____|_|  |_|_|/___ /
> > > >  Apache Artemis 2.54.0-SNAPSHOT
> > > >
> > > >
> > > >
> > > > For a list of commands, type help or press <TAB>:
> > > > Type exit or press <CTRL-D> to leave the session:
> > > > Apache Artemis 2.54.0-SNAPSHOT >
> > > >
> > > >
> > > >
> > > > On Thu, Apr 9, 2026 at 11:09 AM Clebert Suconic <
> > > clebert.suconic@gmail.com>
> > > > wrote:
> > > >
> > > > > If you call just ./artemis. It will ask if you would allow it.
> > > > >
> > > > > Clebert Suconic
> > > > >
> > > > >
> > > > > On Wed, Apr 8, 2026 at 6:00 PM Arthur Naseef <artnaseef@apache.org
> >
> > > wrote:
> > > > >
> > > > > > @Clebert Suconic <cl...@gmail.com> I tested with shell
> > > > > --history
> > > > > > "${HOME}/.artemis-history".  It works as I would expect.  Nice.
> > > Because
> > > > > > typing that out more than once could get tedious and
> error-prone, I
> > > > > > personally would make a helper (either a simple script in
> $HOME/bin,
> > > or
> > > > > an
> > > > > > alias).
> > > > > >
> > > > > > It would be really nice to have the environment variable too.
> Then
> > > I put
> > > > > > it in my .bashrc, or equivalent, and forget about it until I go
> to a
> > > new
> > > > > > machine, where I rinse-and-repeat.
> > > > > >
> > > > > > Hope this helps.
> > > > > >
> > > > > > Art
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Fri, Mar 20, 2026 at 2:58 PM Clebert Suconic <
> > > > > clebert.suconic@gmail.com
> > > > > > >
> > > > > > wrote:
> > > > > >
> > > > > > > @arthur I already made this into the last release. Let me know
> > > what you
> > > > > > > think ?
> > > > > > >
> > > > > > > Clebert Suconic
> > > > > > >
> > > > > > >
> > > > > > > On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <
> > > artnaseef@apache.org>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > I like the idea.  A command-line argument works.
> Personally, at
> > > > > least
> > > > > > on
> > > > > > > > my linux machine, I would prefer to use environment
> variables,
> > > akin
> > > > > to
> > > > > > > > those used by bash.
> > > > > > > >
> > > > > > > > For example, ARTEMIS_HISTORY_FILE.
> > > > > > > >
> > > > > > > > As for a default, I would argue that we don't enable by
> default.
> > > > > For a
> > > > > > > > default filename - again coming from a Linux background - I
> like
> > > > > > > > ${HOME}/.artemis-history or similar (note the leading dot to
> > > make it
> > > > > > > > hidden).
> > > > > > > >
> > > > > > > > WIth all of that said, I personally would probably prefer to
> > > just use
> > > > > > > > 1-liners from the bash shell directly and not use the artemis
> > > shell
> > > > > > > command
> > > > > > > > itself, so take that all with a grain of salt.
> > > > > > > >
> > > > > > > > On the idea of prompting - again Linux background here - I
> don't
> > > > > prefer
> > > > > > > > scripts stopping to prompt for input unless I specifically
> ask
> > > them
> > > > > to
> > > > > > do
> > > > > > > > so.
> > > > > > > >
> > > > > > > > Art
> > > > > > > >
> > > > > > > >
> > > > > > > > On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> > > > > > > > clebert.suconic@gmail.com>
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > I meant to say.. inputPassword already does not save
> anything.
> > > > > > > > >
> > > > > > > > > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > > >
> > > > > > > > > > The inputPassword does not echo anything.
> > > > > > > > > >
> > > > > > > > > > I am now asking for an input ("do you want to enable
> history
> > > on
> > > > > the
> > > > > > > > > > shell") the first time the shell is executed.
> > > > > > > > > >
> > > > > > > > > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > > > > > > > > <ro...@gmail.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > I would keep things simpler and just stick to
> providing it
> > > if
> > > > > you
> > > > > > > > want
> > > > > > > > > > > it, or not having it at all.
> > > > > > > > > > >
> > > > > > > > > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > > > > > > > > clebert.suconic@gmail.com> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Just thought about an idea...
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > I can ask the prompt at the first time the shell is
> > > running:
> > > > > > > > > > > >
> > > > > > > > > > > > - do you want to persist the history of commands?
> (Y/N)
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > if Y:
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > I will print a message at the start of the shell,
> saying
> > > that
> > > > > > > > history
> > > > > > > > > > > > of commands in this shell is preserved at
> (file-path-TBD)
> > > > > > > > > > > >
> > > > > > > > > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > I am adding the possibility to enable a history of
> > > commands
> > > > > > on
> > > > > > > > > ./artemis shell
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > Currently I'm enabling this as optional, as you
> would
> > > have
> > > > > to
> > > > > > > do:
> > > > > > > > > > > > >
> > > > > > > > > > > > > ./artemis shell --history my-file.txt
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > you can see the PR at
> > > > > > > > https://github.com/apache/artemis/pull/6297
> > > > > > > > > ..
> > > > > > > > > > > > > .as it's pretty simple.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > The question I have is if I should use a default
> file
> > > (or
> > > > > > even
> > > > > > > > > allow
> > > > > > > > > > > > > having a default file)?
> > > > > > > > > > > > >
> > > > > > > > > > > > > if I allowed a default file, where should we keep
> it?
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > The issue why I didn't do it automatically is if
> people
> > > > > used
> > > > > > > > > things like:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect
> --user=clebert
> > > > > > > > > --password=mypassword
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > Such thing would be on the history file.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > Opt in is of course a non issue as the file would
> be
> > > > > clearly
> > > > > > > > > managed
> > > > > > > > > > > > > by the user.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > --
> > > > > > > > > > > > > Clebert Suconic
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > Clebert Suconic
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > > > To unsubscribe, e-mail:
> > > dev-unsubscribe@artemis.apache.org
> > > > > > > > > > > > For additional commands, e-mail:
> > > dev-help@artemis.apache.org
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> dev-unsubscribe@artemis.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > dev-help@artemis.apache.org
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Clebert Suconic
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Clebert Suconic
> > > > > > > > >
> > > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > > For additional commands, e-mail:
> dev-help@artemis.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > For additional commands, e-mail: dev-help@artemis.apache.org
> > >
> > >
>
>
>
> --
> Clebert Suconic
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> For additional commands, e-mail: dev-help@artemis.apache.org
>
>

Re: [DISCUSS] Default History on Shell

Posted by Clebert Suconic <cl...@gmail.com>.
I guess on bash it's different, as it's always save on $HOME/.bashHistory


not sure we can allow the same thing here...

I can add a SYSTEM Variable, and print a tip on what to do when not defined.

On Thu, Apr 9, 2026 at 4:33 PM Arthur Naseef <ar...@apache.org> wrote:
>
> Ahh, I see it now.  I was actually just running out of the ARTEMIS_HOME;
> creating an instance and then running it from there I get the prompt.
>
> My 2cents on this - the prompt is OK, especially for a "start a shell"
> command.  I guess what it's coming down to for me here - asking myself is
> it "real obvious?"  The prompt is obvious, but then the creation of the
> etc/history-file after saying "n" maybe not so much.  And if I answer "n"
> and then change my mind (maybe because I hit "n" by accident), then it's
> not obvious that I need to rm etc/history-file to get prompted again.
>
> If we followed the pattern of a well-known example, like bash, then it's
> easier to reach "real obvious" state.
>
> Does this help?
>
> Art
>
>
>
> On Thu, Apr 9, 2026 at 1:07 PM Justin Bertram <jb...@apache.org> wrote:
>
> > When you first start the shell in an instance directory it will ask
> > you if you want to record command history to a file. If you answer
> > "no" then it will create an etc/history-file with "NO_HISTORY" in it
> > so it doesn't ask you every time. My guess is that you have that file
> > in your instance's etc directory.
> >
> >
> > Justin
> >
> > On Thu, Apr 9, 2026 at 3:00 PM Arthur Naseef <ar...@apache.org> wrote:
> > >
> > > This is what I get; am I missing something?
> > >
> > > $ ./artemis
> > >      _        _               _
> > >     / \  ____| |_  ___ __  __(_) _____
> > >    / _ \|  _ \ __|/ _ \  \/  | |/  __/
> > >   / ___ \ | \/ |_/  __/ |\/| | |\___ \
> > >  /_/   \_\|   \__\____|_|  |_|_|/___ /
> > >  Apache Artemis 2.54.0-SNAPSHOT
> > >
> > >
> > >
> > > For a list of commands, type help or press <TAB>:
> > > Type exit or press <CTRL-D> to leave the session:
> > > Apache Artemis 2.54.0-SNAPSHOT >
> > >
> > >
> > >
> > > On Thu, Apr 9, 2026 at 11:09 AM Clebert Suconic <
> > clebert.suconic@gmail.com>
> > > wrote:
> > >
> > > > If you call just ./artemis. It will ask if you would allow it.
> > > >
> > > > Clebert Suconic
> > > >
> > > >
> > > > On Wed, Apr 8, 2026 at 6:00 PM Arthur Naseef <ar...@apache.org>
> > wrote:
> > > >
> > > > > @Clebert Suconic <cl...@gmail.com> I tested with shell
> > > > --history
> > > > > "${HOME}/.artemis-history".  It works as I would expect.  Nice.
> > Because
> > > > > typing that out more than once could get tedious and error-prone, I
> > > > > personally would make a helper (either a simple script in $HOME/bin,
> > or
> > > > an
> > > > > alias).
> > > > >
> > > > > It would be really nice to have the environment variable too.  Then
> > I put
> > > > > it in my .bashrc, or equivalent, and forget about it until I go to a
> > new
> > > > > machine, where I rinse-and-repeat.
> > > > >
> > > > > Hope this helps.
> > > > >
> > > > > Art
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Mar 20, 2026 at 2:58 PM Clebert Suconic <
> > > > clebert.suconic@gmail.com
> > > > > >
> > > > > wrote:
> > > > >
> > > > > > @arthur I already made this into the last release. Let me know
> > what you
> > > > > > think ?
> > > > > >
> > > > > > Clebert Suconic
> > > > > >
> > > > > >
> > > > > > On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <
> > artnaseef@apache.org>
> > > > > > wrote:
> > > > > >
> > > > > > > I like the idea.  A command-line argument works.  Personally, at
> > > > least
> > > > > on
> > > > > > > my linux machine, I would prefer to use environment variables,
> > akin
> > > > to
> > > > > > > those used by bash.
> > > > > > >
> > > > > > > For example, ARTEMIS_HISTORY_FILE.
> > > > > > >
> > > > > > > As for a default, I would argue that we don't enable by default.
> > > > For a
> > > > > > > default filename - again coming from a Linux background - I like
> > > > > > > ${HOME}/.artemis-history or similar (note the leading dot to
> > make it
> > > > > > > hidden).
> > > > > > >
> > > > > > > WIth all of that said, I personally would probably prefer to
> > just use
> > > > > > > 1-liners from the bash shell directly and not use the artemis
> > shell
> > > > > > command
> > > > > > > itself, so take that all with a grain of salt.
> > > > > > >
> > > > > > > On the idea of prompting - again Linux background here - I don't
> > > > prefer
> > > > > > > scripts stopping to prompt for input unless I specifically ask
> > them
> > > > to
> > > > > do
> > > > > > > so.
> > > > > > >
> > > > > > > Art
> > > > > > >
> > > > > > >
> > > > > > > On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> > > > > > > clebert.suconic@gmail.com>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > I meant to say.. inputPassword already does not save anything.
> > > > > > > >
> > > > > > > > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > The inputPassword does not echo anything.
> > > > > > > > >
> > > > > > > > > I am now asking for an input ("do you want to enable history
> > on
> > > > the
> > > > > > > > > shell") the first time the shell is executed.
> > > > > > > > >
> > > > > > > > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > > > > > > > <ro...@gmail.com> wrote:
> > > > > > > > > >
> > > > > > > > > > I would keep things simpler and just stick to providing it
> > if
> > > > you
> > > > > > > want
> > > > > > > > > > it, or not having it at all.
> > > > > > > > > >
> > > > > > > > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > > > > > > > clebert.suconic@gmail.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Just thought about an idea...
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I can ask the prompt at the first time the shell is
> > running:
> > > > > > > > > > >
> > > > > > > > > > > - do you want to persist the history of commands? (Y/N)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > if Y:
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I will print a message at the start of the shell, saying
> > that
> > > > > > > history
> > > > > > > > > > > of commands in this shell is preserved at (file-path-TBD)
> > > > > > > > > > >
> > > > > > > > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > I am adding the possibility to enable a history of
> > commands
> > > > > on
> > > > > > > > ./artemis shell
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > Currently I'm enabling this as optional, as you would
> > have
> > > > to
> > > > > > do:
> > > > > > > > > > > >
> > > > > > > > > > > > ./artemis shell --history my-file.txt
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > you can see the PR at
> > > > > > > https://github.com/apache/artemis/pull/6297
> > > > > > > > ..
> > > > > > > > > > > > .as it's pretty simple.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > The question I have is if I should use a default file
> > (or
> > > > > even
> > > > > > > > allow
> > > > > > > > > > > > having a default file)?
> > > > > > > > > > > >
> > > > > > > > > > > > if I allowed a default file, where should we keep it?
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > The issue why I didn't do it automatically is if people
> > > > used
> > > > > > > > things like:
> > > > > > > > > > > >
> > > > > > > > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert
> > > > > > > > --password=mypassword
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > Such thing would be on the history file.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > Opt in is of course a non issue as the file would be
> > > > clearly
> > > > > > > > managed
> > > > > > > > > > > > by the user.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > Clebert Suconic
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Clebert Suconic
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > dev-unsubscribe@artemis.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > dev-help@artemis.apache.org
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > dev-help@artemis.apache.org
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Clebert Suconic
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Clebert Suconic
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > For additional commands, e-mail: dev-help@artemis.apache.org
> >
> >



-- 
Clebert Suconic

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Clebert Suconic <cl...@gmail.com>.
I will change it to use a system property to have a default


if not defined I will print something like "To Enable Shell History
define a variable named ARTEMIS_SHELL_HISTORY" or use the attribute
--history=<history>

On Thu, Apr 9, 2026 at 4:33 PM Arthur Naseef <ar...@apache.org> wrote:
>
> Ahh, I see it now.  I was actually just running out of the ARTEMIS_HOME;
> creating an instance and then running it from there I get the prompt.
>
> My 2cents on this - the prompt is OK, especially for a "start a shell"
> command.  I guess what it's coming down to for me here - asking myself is
> it "real obvious?"  The prompt is obvious, but then the creation of the
> etc/history-file after saying "n" maybe not so much.  And if I answer "n"
> and then change my mind (maybe because I hit "n" by accident), then it's
> not obvious that I need to rm etc/history-file to get prompted again.
>
> If we followed the pattern of a well-known example, like bash, then it's
> easier to reach "real obvious" state.
>
> Does this help?
>
> Art
>
>
>
> On Thu, Apr 9, 2026 at 1:07 PM Justin Bertram <jb...@apache.org> wrote:
>
> > When you first start the shell in an instance directory it will ask
> > you if you want to record command history to a file. If you answer
> > "no" then it will create an etc/history-file with "NO_HISTORY" in it
> > so it doesn't ask you every time. My guess is that you have that file
> > in your instance's etc directory.
> >
> >
> > Justin
> >
> > On Thu, Apr 9, 2026 at 3:00 PM Arthur Naseef <ar...@apache.org> wrote:
> > >
> > > This is what I get; am I missing something?
> > >
> > > $ ./artemis
> > >      _        _               _
> > >     / \  ____| |_  ___ __  __(_) _____
> > >    / _ \|  _ \ __|/ _ \  \/  | |/  __/
> > >   / ___ \ | \/ |_/  __/ |\/| | |\___ \
> > >  /_/   \_\|   \__\____|_|  |_|_|/___ /
> > >  Apache Artemis 2.54.0-SNAPSHOT
> > >
> > >
> > >
> > > For a list of commands, type help or press <TAB>:
> > > Type exit or press <CTRL-D> to leave the session:
> > > Apache Artemis 2.54.0-SNAPSHOT >
> > >
> > >
> > >
> > > On Thu, Apr 9, 2026 at 11:09 AM Clebert Suconic <
> > clebert.suconic@gmail.com>
> > > wrote:
> > >
> > > > If you call just ./artemis. It will ask if you would allow it.
> > > >
> > > > Clebert Suconic
> > > >
> > > >
> > > > On Wed, Apr 8, 2026 at 6:00 PM Arthur Naseef <ar...@apache.org>
> > wrote:
> > > >
> > > > > @Clebert Suconic <cl...@gmail.com> I tested with shell
> > > > --history
> > > > > "${HOME}/.artemis-history".  It works as I would expect.  Nice.
> > Because
> > > > > typing that out more than once could get tedious and error-prone, I
> > > > > personally would make a helper (either a simple script in $HOME/bin,
> > or
> > > > an
> > > > > alias).
> > > > >
> > > > > It would be really nice to have the environment variable too.  Then
> > I put
> > > > > it in my .bashrc, or equivalent, and forget about it until I go to a
> > new
> > > > > machine, where I rinse-and-repeat.
> > > > >
> > > > > Hope this helps.
> > > > >
> > > > > Art
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Mar 20, 2026 at 2:58 PM Clebert Suconic <
> > > > clebert.suconic@gmail.com
> > > > > >
> > > > > wrote:
> > > > >
> > > > > > @arthur I already made this into the last release. Let me know
> > what you
> > > > > > think ?
> > > > > >
> > > > > > Clebert Suconic
> > > > > >
> > > > > >
> > > > > > On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <
> > artnaseef@apache.org>
> > > > > > wrote:
> > > > > >
> > > > > > > I like the idea.  A command-line argument works.  Personally, at
> > > > least
> > > > > on
> > > > > > > my linux machine, I would prefer to use environment variables,
> > akin
> > > > to
> > > > > > > those used by bash.
> > > > > > >
> > > > > > > For example, ARTEMIS_HISTORY_FILE.
> > > > > > >
> > > > > > > As for a default, I would argue that we don't enable by default.
> > > > For a
> > > > > > > default filename - again coming from a Linux background - I like
> > > > > > > ${HOME}/.artemis-history or similar (note the leading dot to
> > make it
> > > > > > > hidden).
> > > > > > >
> > > > > > > WIth all of that said, I personally would probably prefer to
> > just use
> > > > > > > 1-liners from the bash shell directly and not use the artemis
> > shell
> > > > > > command
> > > > > > > itself, so take that all with a grain of salt.
> > > > > > >
> > > > > > > On the idea of prompting - again Linux background here - I don't
> > > > prefer
> > > > > > > scripts stopping to prompt for input unless I specifically ask
> > them
> > > > to
> > > > > do
> > > > > > > so.
> > > > > > >
> > > > > > > Art
> > > > > > >
> > > > > > >
> > > > > > > On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> > > > > > > clebert.suconic@gmail.com>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > I meant to say.. inputPassword already does not save anything.
> > > > > > > >
> > > > > > > > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > The inputPassword does not echo anything.
> > > > > > > > >
> > > > > > > > > I am now asking for an input ("do you want to enable history
> > on
> > > > the
> > > > > > > > > shell") the first time the shell is executed.
> > > > > > > > >
> > > > > > > > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > > > > > > > <ro...@gmail.com> wrote:
> > > > > > > > > >
> > > > > > > > > > I would keep things simpler and just stick to providing it
> > if
> > > > you
> > > > > > > want
> > > > > > > > > > it, or not having it at all.
> > > > > > > > > >
> > > > > > > > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > > > > > > > clebert.suconic@gmail.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Just thought about an idea...
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I can ask the prompt at the first time the shell is
> > running:
> > > > > > > > > > >
> > > > > > > > > > > - do you want to persist the history of commands? (Y/N)
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > if Y:
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I will print a message at the start of the shell, saying
> > that
> > > > > > > history
> > > > > > > > > > > of commands in this shell is preserved at (file-path-TBD)
> > > > > > > > > > >
> > > > > > > > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > I am adding the possibility to enable a history of
> > commands
> > > > > on
> > > > > > > > ./artemis shell
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > Currently I'm enabling this as optional, as you would
> > have
> > > > to
> > > > > > do:
> > > > > > > > > > > >
> > > > > > > > > > > > ./artemis shell --history my-file.txt
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > you can see the PR at
> > > > > > > https://github.com/apache/artemis/pull/6297
> > > > > > > > ..
> > > > > > > > > > > > .as it's pretty simple.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > The question I have is if I should use a default file
> > (or
> > > > > even
> > > > > > > > allow
> > > > > > > > > > > > having a default file)?
> > > > > > > > > > > >
> > > > > > > > > > > > if I allowed a default file, where should we keep it?
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > The issue why I didn't do it automatically is if people
> > > > used
> > > > > > > > things like:
> > > > > > > > > > > >
> > > > > > > > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert
> > > > > > > > --password=mypassword
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > Such thing would be on the history file.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > Opt in is of course a non issue as the file would be
> > > > clearly
> > > > > > > > managed
> > > > > > > > > > > > by the user.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --
> > > > > > > > > > > > Clebert Suconic
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Clebert Suconic
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > dev-unsubscribe@artemis.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > dev-help@artemis.apache.org
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > dev-help@artemis.apache.org
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Clebert Suconic
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Clebert Suconic
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > For additional commands, e-mail: dev-help@artemis.apache.org
> >
> >



-- 
Clebert Suconic

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Arthur Naseef <ar...@apache.org>.
Ahh, I see it now.  I was actually just running out of the ARTEMIS_HOME;
creating an instance and then running it from there I get the prompt.

My 2cents on this - the prompt is OK, especially for a "start a shell"
command.  I guess what it's coming down to for me here - asking myself is
it "real obvious?"  The prompt is obvious, but then the creation of the
etc/history-file after saying "n" maybe not so much.  And if I answer "n"
and then change my mind (maybe because I hit "n" by accident), then it's
not obvious that I need to rm etc/history-file to get prompted again.

If we followed the pattern of a well-known example, like bash, then it's
easier to reach "real obvious" state.

Does this help?

Art



On Thu, Apr 9, 2026 at 1:07 PM Justin Bertram <jb...@apache.org> wrote:

> When you first start the shell in an instance directory it will ask
> you if you want to record command history to a file. If you answer
> "no" then it will create an etc/history-file with "NO_HISTORY" in it
> so it doesn't ask you every time. My guess is that you have that file
> in your instance's etc directory.
>
>
> Justin
>
> On Thu, Apr 9, 2026 at 3:00 PM Arthur Naseef <ar...@apache.org> wrote:
> >
> > This is what I get; am I missing something?
> >
> > $ ./artemis
> >      _        _               _
> >     / \  ____| |_  ___ __  __(_) _____
> >    / _ \|  _ \ __|/ _ \  \/  | |/  __/
> >   / ___ \ | \/ |_/  __/ |\/| | |\___ \
> >  /_/   \_\|   \__\____|_|  |_|_|/___ /
> >  Apache Artemis 2.54.0-SNAPSHOT
> >
> >
> >
> > For a list of commands, type help or press <TAB>:
> > Type exit or press <CTRL-D> to leave the session:
> > Apache Artemis 2.54.0-SNAPSHOT >
> >
> >
> >
> > On Thu, Apr 9, 2026 at 11:09 AM Clebert Suconic <
> clebert.suconic@gmail.com>
> > wrote:
> >
> > > If you call just ./artemis. It will ask if you would allow it.
> > >
> > > Clebert Suconic
> > >
> > >
> > > On Wed, Apr 8, 2026 at 6:00 PM Arthur Naseef <ar...@apache.org>
> wrote:
> > >
> > > > @Clebert Suconic <cl...@gmail.com> I tested with shell
> > > --history
> > > > "${HOME}/.artemis-history".  It works as I would expect.  Nice.
> Because
> > > > typing that out more than once could get tedious and error-prone, I
> > > > personally would make a helper (either a simple script in $HOME/bin,
> or
> > > an
> > > > alias).
> > > >
> > > > It would be really nice to have the environment variable too.  Then
> I put
> > > > it in my .bashrc, or equivalent, and forget about it until I go to a
> new
> > > > machine, where I rinse-and-repeat.
> > > >
> > > > Hope this helps.
> > > >
> > > > Art
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, Mar 20, 2026 at 2:58 PM Clebert Suconic <
> > > clebert.suconic@gmail.com
> > > > >
> > > > wrote:
> > > >
> > > > > @arthur I already made this into the last release. Let me know
> what you
> > > > > think ?
> > > > >
> > > > > Clebert Suconic
> > > > >
> > > > >
> > > > > On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <
> artnaseef@apache.org>
> > > > > wrote:
> > > > >
> > > > > > I like the idea.  A command-line argument works.  Personally, at
> > > least
> > > > on
> > > > > > my linux machine, I would prefer to use environment variables,
> akin
> > > to
> > > > > > those used by bash.
> > > > > >
> > > > > > For example, ARTEMIS_HISTORY_FILE.
> > > > > >
> > > > > > As for a default, I would argue that we don't enable by default.
> > > For a
> > > > > > default filename - again coming from a Linux background - I like
> > > > > > ${HOME}/.artemis-history or similar (note the leading dot to
> make it
> > > > > > hidden).
> > > > > >
> > > > > > WIth all of that said, I personally would probably prefer to
> just use
> > > > > > 1-liners from the bash shell directly and not use the artemis
> shell
> > > > > command
> > > > > > itself, so take that all with a grain of salt.
> > > > > >
> > > > > > On the idea of prompting - again Linux background here - I don't
> > > prefer
> > > > > > scripts stopping to prompt for input unless I specifically ask
> them
> > > to
> > > > do
> > > > > > so.
> > > > > >
> > > > > > Art
> > > > > >
> > > > > >
> > > > > > On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> > > > > > clebert.suconic@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > > > I meant to say.. inputPassword already does not save anything.
> > > > > > >
> > > > > > > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > > > > > > <cl...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > The inputPassword does not echo anything.
> > > > > > > >
> > > > > > > > I am now asking for an input ("do you want to enable history
> on
> > > the
> > > > > > > > shell") the first time the shell is executed.
> > > > > > > >
> > > > > > > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > > > > > > <ro...@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > I would keep things simpler and just stick to providing it
> if
> > > you
> > > > > > want
> > > > > > > > > it, or not having it at all.
> > > > > > > > >
> > > > > > > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > > > > > > clebert.suconic@gmail.com> wrote:
> > > > > > > > > >
> > > > > > > > > > Just thought about an idea...
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > I can ask the prompt at the first time the shell is
> running:
> > > > > > > > > >
> > > > > > > > > > - do you want to persist the history of commands? (Y/N)
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > if Y:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > I will print a message at the start of the shell, saying
> that
> > > > > > history
> > > > > > > > > > of commands in this shell is preserved at (file-path-TBD)
> > > > > > > > > >
> > > > > > > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > > > >
> > > > > > > > > > > I am adding the possibility to enable a history of
> commands
> > > > on
> > > > > > > ./artemis shell
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Currently I'm enabling this as optional, as you would
> have
> > > to
> > > > > do:
> > > > > > > > > > >
> > > > > > > > > > > ./artemis shell --history my-file.txt
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > you can see the PR at
> > > > > > https://github.com/apache/artemis/pull/6297
> > > > > > > ..
> > > > > > > > > > > .as it's pretty simple.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > The question I have is if I should use a default file
> (or
> > > > even
> > > > > > > allow
> > > > > > > > > > > having a default file)?
> > > > > > > > > > >
> > > > > > > > > > > if I allowed a default file, where should we keep it?
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > The issue why I didn't do it automatically is if people
> > > used
> > > > > > > things like:
> > > > > > > > > > >
> > > > > > > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert
> > > > > > > --password=mypassword
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Such thing would be on the history file.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > Opt in is of course a non issue as the file would be
> > > clearly
> > > > > > > managed
> > > > > > > > > > > by the user.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Clebert Suconic
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Clebert Suconic
> > > > > > > > > >
> > > > > > > > > >
> > > > > >
> ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> dev-unsubscribe@artemis.apache.org
> > > > > > > > > > For additional commands, e-mail:
> dev-help@artemis.apache.org
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > > For additional commands, e-mail:
> dev-help@artemis.apache.org
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Clebert Suconic
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Clebert Suconic
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> For additional commands, e-mail: dev-help@artemis.apache.org
>
>

Re: [DISCUSS] Default History on Shell

Posted by Justin Bertram <jb...@apache.org>.
When you first start the shell in an instance directory it will ask
you if you want to record command history to a file. If you answer
"no" then it will create an etc/history-file with "NO_HISTORY" in it
so it doesn't ask you every time. My guess is that you have that file
in your instance's etc directory.


Justin

On Thu, Apr 9, 2026 at 3:00 PM Arthur Naseef <ar...@apache.org> wrote:
>
> This is what I get; am I missing something?
>
> $ ./artemis
>      _        _               _
>     / \  ____| |_  ___ __  __(_) _____
>    / _ \|  _ \ __|/ _ \  \/  | |/  __/
>   / ___ \ | \/ |_/  __/ |\/| | |\___ \
>  /_/   \_\|   \__\____|_|  |_|_|/___ /
>  Apache Artemis 2.54.0-SNAPSHOT
>
>
>
> For a list of commands, type help or press <TAB>:
> Type exit or press <CTRL-D> to leave the session:
> Apache Artemis 2.54.0-SNAPSHOT >
>
>
>
> On Thu, Apr 9, 2026 at 11:09 AM Clebert Suconic <cl...@gmail.com>
> wrote:
>
> > If you call just ./artemis. It will ask if you would allow it.
> >
> > Clebert Suconic
> >
> >
> > On Wed, Apr 8, 2026 at 6:00 PM Arthur Naseef <ar...@apache.org> wrote:
> >
> > > @Clebert Suconic <cl...@gmail.com> I tested with shell
> > --history
> > > "${HOME}/.artemis-history".  It works as I would expect.  Nice.  Because
> > > typing that out more than once could get tedious and error-prone, I
> > > personally would make a helper (either a simple script in $HOME/bin, or
> > an
> > > alias).
> > >
> > > It would be really nice to have the environment variable too.  Then I put
> > > it in my .bashrc, or equivalent, and forget about it until I go to a new
> > > machine, where I rinse-and-repeat.
> > >
> > > Hope this helps.
> > >
> > > Art
> > >
> > >
> > >
> > >
> > > On Fri, Mar 20, 2026 at 2:58 PM Clebert Suconic <
> > clebert.suconic@gmail.com
> > > >
> > > wrote:
> > >
> > > > @arthur I already made this into the last release. Let me know what you
> > > > think ?
> > > >
> > > > Clebert Suconic
> > > >
> > > >
> > > > On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <ar...@apache.org>
> > > > wrote:
> > > >
> > > > > I like the idea.  A command-line argument works.  Personally, at
> > least
> > > on
> > > > > my linux machine, I would prefer to use environment variables, akin
> > to
> > > > > those used by bash.
> > > > >
> > > > > For example, ARTEMIS_HISTORY_FILE.
> > > > >
> > > > > As for a default, I would argue that we don't enable by default.
> > For a
> > > > > default filename - again coming from a Linux background - I like
> > > > > ${HOME}/.artemis-history or similar (note the leading dot to make it
> > > > > hidden).
> > > > >
> > > > > WIth all of that said, I personally would probably prefer to just use
> > > > > 1-liners from the bash shell directly and not use the artemis shell
> > > > command
> > > > > itself, so take that all with a grain of salt.
> > > > >
> > > > > On the idea of prompting - again Linux background here - I don't
> > prefer
> > > > > scripts stopping to prompt for input unless I specifically ask them
> > to
> > > do
> > > > > so.
> > > > >
> > > > > Art
> > > > >
> > > > >
> > > > > On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> > > > > clebert.suconic@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > I meant to say.. inputPassword already does not save anything.
> > > > > >
> > > > > > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > > > > > <cl...@gmail.com> wrote:
> > > > > > >
> > > > > > > The inputPassword does not echo anything.
> > > > > > >
> > > > > > > I am now asking for an input ("do you want to enable history on
> > the
> > > > > > > shell") the first time the shell is executed.
> > > > > > >
> > > > > > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > > > > > <ro...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > I would keep things simpler and just stick to providing it if
> > you
> > > > > want
> > > > > > > > it, or not having it at all.
> > > > > > > >
> > > > > > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > > > > > clebert.suconic@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > Just thought about an idea...
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > I can ask the prompt at the first time the shell is running:
> > > > > > > > >
> > > > > > > > > - do you want to persist the history of commands? (Y/N)
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > if Y:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > I will print a message at the start of the shell, saying that
> > > > > history
> > > > > > > > > of commands in this shell is preserved at (file-path-TBD)
> > > > > > > > >
> > > > > > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > > >
> > > > > > > > > > I am adding the possibility to enable a history of commands
> > > on
> > > > > > ./artemis shell
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Currently I'm enabling this as optional, as you would have
> > to
> > > > do:
> > > > > > > > > >
> > > > > > > > > > ./artemis shell --history my-file.txt
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > you can see the PR at
> > > > > https://github.com/apache/artemis/pull/6297
> > > > > > ..
> > > > > > > > > > .as it's pretty simple.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > The question I have is if I should use a default file (or
> > > even
> > > > > > allow
> > > > > > > > > > having a default file)?
> > > > > > > > > >
> > > > > > > > > > if I allowed a default file, where should we keep it?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > The issue why I didn't do it automatically is if people
> > used
> > > > > > things like:
> > > > > > > > > >
> > > > > > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert
> > > > > > --password=mypassword
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Such thing would be on the history file.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Opt in is of course a non issue as the file would be
> > clearly
> > > > > > managed
> > > > > > > > > > by the user.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --
> > > > > > > > > > Clebert Suconic
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Clebert Suconic
> > > > > > > > >
> > > > > > > > >
> > > > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Clebert Suconic
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Clebert Suconic
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Arthur Naseef <ar...@apache.org>.
This is what I get; am I missing something?

$ ./artemis
     _        _               _
    / \  ____| |_  ___ __  __(_) _____
   / _ \|  _ \ __|/ _ \  \/  | |/  __/
  / ___ \ | \/ |_/  __/ |\/| | |\___ \
 /_/   \_\|   \__\____|_|  |_|_|/___ /
 Apache Artemis 2.54.0-SNAPSHOT



For a list of commands, type help or press <TAB>:
Type exit or press <CTRL-D> to leave the session:
Apache Artemis 2.54.0-SNAPSHOT >



On Thu, Apr 9, 2026 at 11:09 AM Clebert Suconic <cl...@gmail.com>
wrote:

> If you call just ./artemis. It will ask if you would allow it.
>
> Clebert Suconic
>
>
> On Wed, Apr 8, 2026 at 6:00 PM Arthur Naseef <ar...@apache.org> wrote:
>
> > @Clebert Suconic <cl...@gmail.com> I tested with shell
> --history
> > "${HOME}/.artemis-history".  It works as I would expect.  Nice.  Because
> > typing that out more than once could get tedious and error-prone, I
> > personally would make a helper (either a simple script in $HOME/bin, or
> an
> > alias).
> >
> > It would be really nice to have the environment variable too.  Then I put
> > it in my .bashrc, or equivalent, and forget about it until I go to a new
> > machine, where I rinse-and-repeat.
> >
> > Hope this helps.
> >
> > Art
> >
> >
> >
> >
> > On Fri, Mar 20, 2026 at 2:58 PM Clebert Suconic <
> clebert.suconic@gmail.com
> > >
> > wrote:
> >
> > > @arthur I already made this into the last release. Let me know what you
> > > think ?
> > >
> > > Clebert Suconic
> > >
> > >
> > > On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <ar...@apache.org>
> > > wrote:
> > >
> > > > I like the idea.  A command-line argument works.  Personally, at
> least
> > on
> > > > my linux machine, I would prefer to use environment variables, akin
> to
> > > > those used by bash.
> > > >
> > > > For example, ARTEMIS_HISTORY_FILE.
> > > >
> > > > As for a default, I would argue that we don't enable by default.
> For a
> > > > default filename - again coming from a Linux background - I like
> > > > ${HOME}/.artemis-history or similar (note the leading dot to make it
> > > > hidden).
> > > >
> > > > WIth all of that said, I personally would probably prefer to just use
> > > > 1-liners from the bash shell directly and not use the artemis shell
> > > command
> > > > itself, so take that all with a grain of salt.
> > > >
> > > > On the idea of prompting - again Linux background here - I don't
> prefer
> > > > scripts stopping to prompt for input unless I specifically ask them
> to
> > do
> > > > so.
> > > >
> > > > Art
> > > >
> > > >
> > > > On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> > > > clebert.suconic@gmail.com>
> > > > wrote:
> > > >
> > > > > I meant to say.. inputPassword already does not save anything.
> > > > >
> > > > > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > > > > <cl...@gmail.com> wrote:
> > > > > >
> > > > > > The inputPassword does not echo anything.
> > > > > >
> > > > > > I am now asking for an input ("do you want to enable history on
> the
> > > > > > shell") the first time the shell is executed.
> > > > > >
> > > > > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > > > > <ro...@gmail.com> wrote:
> > > > > > >
> > > > > > > I would keep things simpler and just stick to providing it if
> you
> > > > want
> > > > > > > it, or not having it at all.
> > > > > > >
> > > > > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > > > > clebert.suconic@gmail.com> wrote:
> > > > > > > >
> > > > > > > > Just thought about an idea...
> > > > > > > >
> > > > > > > >
> > > > > > > > I can ask the prompt at the first time the shell is running:
> > > > > > > >
> > > > > > > > - do you want to persist the history of commands? (Y/N)
> > > > > > > >
> > > > > > > >
> > > > > > > > if Y:
> > > > > > > >
> > > > > > > >
> > > > > > > > I will print a message at the start of the shell, saying that
> > > > history
> > > > > > > > of commands in this shell is preserved at (file-path-TBD)
> > > > > > > >
> > > > > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > > > > <cl...@gmail.com> wrote:
> > > > > > > > >
> > > > > > > > > I am adding the possibility to enable a history of commands
> > on
> > > > > ./artemis shell
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Currently I'm enabling this as optional, as you would have
> to
> > > do:
> > > > > > > > >
> > > > > > > > > ./artemis shell --history my-file.txt
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > you can see the PR at
> > > > https://github.com/apache/artemis/pull/6297
> > > > > ..
> > > > > > > > > .as it's pretty simple.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > The question I have is if I should use a default file (or
> > even
> > > > > allow
> > > > > > > > > having a default file)?
> > > > > > > > >
> > > > > > > > > if I allowed a default file, where should we keep it?
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > The issue why I didn't do it automatically is if people
> used
> > > > > things like:
> > > > > > > > >
> > > > > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert
> > > > > --password=mypassword
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Such thing would be on the history file.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Opt in is of course a non issue as the file would be
> clearly
> > > > > managed
> > > > > > > > > by the user.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Clebert Suconic
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Clebert Suconic
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > > > >
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Clebert Suconic
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Clebert Suconic
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: [DISCUSS] Default History on Shell

Posted by Clebert Suconic <cl...@gmail.com>.
If you call just ./artemis. It will ask if you would allow it.

Clebert Suconic


On Wed, Apr 8, 2026 at 6:00 PM Arthur Naseef <ar...@apache.org> wrote:

> @Clebert Suconic <cl...@gmail.com> I tested with shell --history
> "${HOME}/.artemis-history".  It works as I would expect.  Nice.  Because
> typing that out more than once could get tedious and error-prone, I
> personally would make a helper (either a simple script in $HOME/bin, or an
> alias).
>
> It would be really nice to have the environment variable too.  Then I put
> it in my .bashrc, or equivalent, and forget about it until I go to a new
> machine, where I rinse-and-repeat.
>
> Hope this helps.
>
> Art
>
>
>
>
> On Fri, Mar 20, 2026 at 2:58 PM Clebert Suconic <clebert.suconic@gmail.com
> >
> wrote:
>
> > @arthur I already made this into the last release. Let me know what you
> > think ?
> >
> > Clebert Suconic
> >
> >
> > On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <ar...@apache.org>
> > wrote:
> >
> > > I like the idea.  A command-line argument works.  Personally, at least
> on
> > > my linux machine, I would prefer to use environment variables, akin to
> > > those used by bash.
> > >
> > > For example, ARTEMIS_HISTORY_FILE.
> > >
> > > As for a default, I would argue that we don't enable by default.  For a
> > > default filename - again coming from a Linux background - I like
> > > ${HOME}/.artemis-history or similar (note the leading dot to make it
> > > hidden).
> > >
> > > WIth all of that said, I personally would probably prefer to just use
> > > 1-liners from the bash shell directly and not use the artemis shell
> > command
> > > itself, so take that all with a grain of salt.
> > >
> > > On the idea of prompting - again Linux background here - I don't prefer
> > > scripts stopping to prompt for input unless I specifically ask them to
> do
> > > so.
> > >
> > > Art
> > >
> > >
> > > On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> > > clebert.suconic@gmail.com>
> > > wrote:
> > >
> > > > I meant to say.. inputPassword already does not save anything.
> > > >
> > > > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > > > <cl...@gmail.com> wrote:
> > > > >
> > > > > The inputPassword does not echo anything.
> > > > >
> > > > > I am now asking for an input ("do you want to enable history on the
> > > > > shell") the first time the shell is executed.
> > > > >
> > > > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > > > <ro...@gmail.com> wrote:
> > > > > >
> > > > > > I would keep things simpler and just stick to providing it if you
> > > want
> > > > > > it, or not having it at all.
> > > > > >
> > > > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > > > clebert.suconic@gmail.com> wrote:
> > > > > > >
> > > > > > > Just thought about an idea...
> > > > > > >
> > > > > > >
> > > > > > > I can ask the prompt at the first time the shell is running:
> > > > > > >
> > > > > > > - do you want to persist the history of commands? (Y/N)
> > > > > > >
> > > > > > >
> > > > > > > if Y:
> > > > > > >
> > > > > > >
> > > > > > > I will print a message at the start of the shell, saying that
> > > history
> > > > > > > of commands in this shell is preserved at (file-path-TBD)
> > > > > > >
> > > > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > > > <cl...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > I am adding the possibility to enable a history of commands
> on
> > > > ./artemis shell
> > > > > > > >
> > > > > > > >
> > > > > > > > Currently I'm enabling this as optional, as you would have to
> > do:
> > > > > > > >
> > > > > > > > ./artemis shell --history my-file.txt
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > you can see the PR at
> > > https://github.com/apache/artemis/pull/6297
> > > > ..
> > > > > > > > .as it's pretty simple.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > The question I have is if I should use a default file (or
> even
> > > > allow
> > > > > > > > having a default file)?
> > > > > > > >
> > > > > > > > if I allowed a default file, where should we keep it?
> > > > > > > >
> > > > > > > >
> > > > > > > > The issue why I didn't do it automatically is if people used
> > > > things like:
> > > > > > > >
> > > > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert
> > > > --password=mypassword
> > > > > > > >
> > > > > > > >
> > > > > > > > Such thing would be on the history file.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Opt in is of course a non issue as the file would be clearly
> > > > managed
> > > > > > > > by the user.
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Clebert Suconic
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Clebert Suconic
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > > >
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Clebert Suconic
> > > >
> > > >
> > > >
> > > > --
> > > > Clebert Suconic
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > >
> > > >
> > >
> >
>

Re: [DISCUSS] Default History on Shell

Posted by Arthur Naseef <ar...@apache.org>.
@Clebert Suconic <cl...@gmail.com> I tested with shell --history
"${HOME}/.artemis-history".  It works as I would expect.  Nice.  Because
typing that out more than once could get tedious and error-prone, I
personally would make a helper (either a simple script in $HOME/bin, or an
alias).

It would be really nice to have the environment variable too.  Then I put
it in my .bashrc, or equivalent, and forget about it until I go to a new
machine, where I rinse-and-repeat.

Hope this helps.

Art




On Fri, Mar 20, 2026 at 2:58 PM Clebert Suconic <cl...@gmail.com>
wrote:

> @arthur I already made this into the last release. Let me know what you
> think ?
>
> Clebert Suconic
>
>
> On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <ar...@apache.org>
> wrote:
>
> > I like the idea.  A command-line argument works.  Personally, at least on
> > my linux machine, I would prefer to use environment variables, akin to
> > those used by bash.
> >
> > For example, ARTEMIS_HISTORY_FILE.
> >
> > As for a default, I would argue that we don't enable by default.  For a
> > default filename - again coming from a Linux background - I like
> > ${HOME}/.artemis-history or similar (note the leading dot to make it
> > hidden).
> >
> > WIth all of that said, I personally would probably prefer to just use
> > 1-liners from the bash shell directly and not use the artemis shell
> command
> > itself, so take that all with a grain of salt.
> >
> > On the idea of prompting - again Linux background here - I don't prefer
> > scripts stopping to prompt for input unless I specifically ask them to do
> > so.
> >
> > Art
> >
> >
> > On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> > clebert.suconic@gmail.com>
> > wrote:
> >
> > > I meant to say.. inputPassword already does not save anything.
> > >
> > > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > > <cl...@gmail.com> wrote:
> > > >
> > > > The inputPassword does not echo anything.
> > > >
> > > > I am now asking for an input ("do you want to enable history on the
> > > > shell") the first time the shell is executed.
> > > >
> > > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > > <ro...@gmail.com> wrote:
> > > > >
> > > > > I would keep things simpler and just stick to providing it if you
> > want
> > > > > it, or not having it at all.
> > > > >
> > > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > > clebert.suconic@gmail.com> wrote:
> > > > > >
> > > > > > Just thought about an idea...
> > > > > >
> > > > > >
> > > > > > I can ask the prompt at the first time the shell is running:
> > > > > >
> > > > > > - do you want to persist the history of commands? (Y/N)
> > > > > >
> > > > > >
> > > > > > if Y:
> > > > > >
> > > > > >
> > > > > > I will print a message at the start of the shell, saying that
> > history
> > > > > > of commands in this shell is preserved at (file-path-TBD)
> > > > > >
> > > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > > <cl...@gmail.com> wrote:
> > > > > > >
> > > > > > > I am adding the possibility to enable a history of commands on
> > > ./artemis shell
> > > > > > >
> > > > > > >
> > > > > > > Currently I'm enabling this as optional, as you would have to
> do:
> > > > > > >
> > > > > > > ./artemis shell --history my-file.txt
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > you can see the PR at
> > https://github.com/apache/artemis/pull/6297
> > > ..
> > > > > > > .as it's pretty simple.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > The question I have is if I should use a default file (or even
> > > allow
> > > > > > > having a default file)?
> > > > > > >
> > > > > > > if I allowed a default file, where should we keep it?
> > > > > > >
> > > > > > >
> > > > > > > The issue why I didn't do it automatically is if people used
> > > things like:
> > > > > > >
> > > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert
> > > --password=mypassword
> > > > > > >
> > > > > > >
> > > > > > > Such thing would be on the history file.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Opt in is of course a non issue as the file would be clearly
> > > managed
> > > > > > > by the user.
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Clebert Suconic
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Clebert Suconic
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > >
> > > >
> > > >
> > > > --
> > > > Clebert Suconic
> > >
> > >
> > >
> > > --
> > > Clebert Suconic
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > For additional commands, e-mail: dev-help@artemis.apache.org
> > >
> > >
> >
>

Re: [DISCUSS] Default History on Shell

Posted by Clebert Suconic <cl...@gmail.com>.
@arthur I already made this into the last release. Let me know what you
think ?

Clebert Suconic


On Fri, Mar 20, 2026 at 2:44 PM Arthur Naseef <ar...@apache.org> wrote:

> I like the idea.  A command-line argument works.  Personally, at least on
> my linux machine, I would prefer to use environment variables, akin to
> those used by bash.
>
> For example, ARTEMIS_HISTORY_FILE.
>
> As for a default, I would argue that we don't enable by default.  For a
> default filename - again coming from a Linux background - I like
> ${HOME}/.artemis-history or similar (note the leading dot to make it
> hidden).
>
> WIth all of that said, I personally would probably prefer to just use
> 1-liners from the bash shell directly and not use the artemis shell command
> itself, so take that all with a grain of salt.
>
> On the idea of prompting - again Linux background here - I don't prefer
> scripts stopping to prompt for input unless I specifically ask them to do
> so.
>
> Art
>
>
> On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <
> clebert.suconic@gmail.com>
> wrote:
>
> > I meant to say.. inputPassword already does not save anything.
> >
> > On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> > <cl...@gmail.com> wrote:
> > >
> > > The inputPassword does not echo anything.
> > >
> > > I am now asking for an input ("do you want to enable history on the
> > > shell") the first time the shell is executed.
> > >
> > > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > > <ro...@gmail.com> wrote:
> > > >
> > > > I would keep things simpler and just stick to providing it if you
> want
> > > > it, or not having it at all.
> > > >
> > > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> > clebert.suconic@gmail.com> wrote:
> > > > >
> > > > > Just thought about an idea...
> > > > >
> > > > >
> > > > > I can ask the prompt at the first time the shell is running:
> > > > >
> > > > > - do you want to persist the history of commands? (Y/N)
> > > > >
> > > > >
> > > > > if Y:
> > > > >
> > > > >
> > > > > I will print a message at the start of the shell, saying that
> history
> > > > > of commands in this shell is preserved at (file-path-TBD)
> > > > >
> > > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > > <cl...@gmail.com> wrote:
> > > > > >
> > > > > > I am adding the possibility to enable a history of commands on
> > ./artemis shell
> > > > > >
> > > > > >
> > > > > > Currently I'm enabling this as optional, as you would have to do:
> > > > > >
> > > > > > ./artemis shell --history my-file.txt
> > > > > >
> > > > > >
> > > > > >
> > > > > > you can see the PR at
> https://github.com/apache/artemis/pull/6297
> > ..
> > > > > > .as it's pretty simple.
> > > > > >
> > > > > >
> > > > > >
> > > > > > The question I have is if I should use a default file (or even
> > allow
> > > > > > having a default file)?
> > > > > >
> > > > > > if I allowed a default file, where should we keep it?
> > > > > >
> > > > > >
> > > > > > The issue why I didn't do it automatically is if people used
> > things like:
> > > > > >
> > > > > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert
> > --password=mypassword
> > > > > >
> > > > > >
> > > > > > Such thing would be on the history file.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Opt in is of course a non issue as the file would be clearly
> > managed
> > > > > > by the user.
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Clebert Suconic
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Clebert Suconic
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > >
> > >
> > >
> > > --
> > > Clebert Suconic
> >
> >
> >
> > --
> > Clebert Suconic
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > For additional commands, e-mail: dev-help@artemis.apache.org
> >
> >
>

Re: [DISCUSS] Default History on Shell

Posted by Arthur Naseef <ar...@apache.org>.
I like the idea.  A command-line argument works.  Personally, at least on
my linux machine, I would prefer to use environment variables, akin to
those used by bash.

For example, ARTEMIS_HISTORY_FILE.

As for a default, I would argue that we don't enable by default.  For a
default filename - again coming from a Linux background - I like
${HOME}/.artemis-history or similar (note the leading dot to make it
hidden).

WIth all of that said, I personally would probably prefer to just use
1-liners from the bash shell directly and not use the artemis shell command
itself, so take that all with a grain of salt.

On the idea of prompting - again Linux background here - I don't prefer
scripts stopping to prompt for input unless I specifically ask them to do
so.

Art


On Mon, Mar 16, 2026 at 10:12 AM Clebert Suconic <cl...@gmail.com>
wrote:

> I meant to say.. inputPassword already does not save anything.
>
> On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> <cl...@gmail.com> wrote:
> >
> > The inputPassword does not echo anything.
> >
> > I am now asking for an input ("do you want to enable history on the
> > shell") the first time the shell is executed.
> >
> > On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> > <ro...@gmail.com> wrote:
> > >
> > > I would keep things simpler and just stick to providing it if you want
> > > it, or not having it at all.
> > >
> > > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <
> clebert.suconic@gmail.com> wrote:
> > > >
> > > > Just thought about an idea...
> > > >
> > > >
> > > > I can ask the prompt at the first time the shell is running:
> > > >
> > > > - do you want to persist the history of commands? (Y/N)
> > > >
> > > >
> > > > if Y:
> > > >
> > > >
> > > > I will print a message at the start of the shell, saying that history
> > > > of commands in this shell is preserved at (file-path-TBD)
> > > >
> > > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > > <cl...@gmail.com> wrote:
> > > > >
> > > > > I am adding the possibility to enable a history of commands on
> ./artemis shell
> > > > >
> > > > >
> > > > > Currently I'm enabling this as optional, as you would have to do:
> > > > >
> > > > > ./artemis shell --history my-file.txt
> > > > >
> > > > >
> > > > >
> > > > > you can see the PR at https://github.com/apache/artemis/pull/6297
> ..
> > > > > .as it's pretty simple.
> > > > >
> > > > >
> > > > >
> > > > > The question I have is if I should use a default file (or even
> allow
> > > > > having a default file)?
> > > > >
> > > > > if I allowed a default file, where should we keep it?
> > > > >
> > > > >
> > > > > The issue why I didn't do it automatically is if people used
> things like:
> > > > >
> > > > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert
> --password=mypassword
> > > > >
> > > > >
> > > > > Such thing would be on the history file.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Opt in is of course a non issue as the file would be clearly
> managed
> > > > > by the user.
> > > > >
> > > > >
> > > > > --
> > > > > Clebert Suconic
> > > >
> > > >
> > > >
> > > > --
> > > > Clebert Suconic
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > > For additional commands, e-mail: dev-help@artemis.apache.org
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > For additional commands, e-mail: dev-help@artemis.apache.org
> > >
> >
> >
> > --
> > Clebert Suconic
>
>
>
> --
> Clebert Suconic
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> For additional commands, e-mail: dev-help@artemis.apache.org
>
>

Re: [DISCUSS] Default History on Shell

Posted by Clebert Suconic <cl...@gmail.com>.
I meant to say.. inputPassword already does not save anything.

On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
<cl...@gmail.com> wrote:
>
> The inputPassword does not echo anything.
>
> I am now asking for an input ("do you want to enable history on the
> shell") the first time the shell is executed.
>
> On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
> <ro...@gmail.com> wrote:
> >
> > I would keep things simpler and just stick to providing it if you want
> > it, or not having it at all.
> >
> > On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <cl...@gmail.com> wrote:
> > >
> > > Just thought about an idea...
> > >
> > >
> > > I can ask the prompt at the first time the shell is running:
> > >
> > > - do you want to persist the history of commands? (Y/N)
> > >
> > >
> > > if Y:
> > >
> > >
> > > I will print a message at the start of the shell, saying that history
> > > of commands in this shell is preserved at (file-path-TBD)
> > >
> > > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > > <cl...@gmail.com> wrote:
> > > >
> > > > I am adding the possibility to enable a history of commands on ./artemis shell
> > > >
> > > >
> > > > Currently I'm enabling this as optional, as you would have to do:
> > > >
> > > > ./artemis shell --history my-file.txt
> > > >
> > > >
> > > >
> > > > you can see the PR at https://github.com/apache/artemis/pull/6297 ..
> > > > .as it's pretty simple.
> > > >
> > > >
> > > >
> > > > The question I have is if I should use a default file (or even allow
> > > > having a default file)?
> > > >
> > > > if I allowed a default file, where should we keep it?
> > > >
> > > >
> > > > The issue why I didn't do it automatically is if people used things like:
> > > >
> > > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert --password=mypassword
> > > >
> > > >
> > > > Such thing would be on the history file.
> > > >
> > > >
> > > >
> > > >
> > > > Opt in is of course a non issue as the file would be clearly managed
> > > > by the user.
> > > >
> > > >
> > > > --
> > > > Clebert Suconic
> > >
> > >
> > >
> > > --
> > > Clebert Suconic
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > > For additional commands, e-mail: dev-help@artemis.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > For additional commands, e-mail: dev-help@artemis.apache.org
> >
>
>
> --
> Clebert Suconic



-- 
Clebert Suconic

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Clebert Suconic <cl...@gmail.com>.
The inputPassword does not echo anything.

I am now asking for an input ("do you want to enable history on the
shell") the first time the shell is executed.

On Mon, Mar 16, 2026 at 12:27 PM Robbie Gemmell
<ro...@gmail.com> wrote:
>
> I would keep things simpler and just stick to providing it if you want
> it, or not having it at all.
>
> On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <cl...@gmail.com> wrote:
> >
> > Just thought about an idea...
> >
> >
> > I can ask the prompt at the first time the shell is running:
> >
> > - do you want to persist the history of commands? (Y/N)
> >
> >
> > if Y:
> >
> >
> > I will print a message at the start of the shell, saying that history
> > of commands in this shell is preserved at (file-path-TBD)
> >
> > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > <cl...@gmail.com> wrote:
> > >
> > > I am adding the possibility to enable a history of commands on ./artemis shell
> > >
> > >
> > > Currently I'm enabling this as optional, as you would have to do:
> > >
> > > ./artemis shell --history my-file.txt
> > >
> > >
> > >
> > > you can see the PR at https://github.com/apache/artemis/pull/6297 ..
> > > .as it's pretty simple.
> > >
> > >
> > >
> > > The question I have is if I should use a default file (or even allow
> > > having a default file)?
> > >
> > > if I allowed a default file, where should we keep it?
> > >
> > >
> > > The issue why I didn't do it automatically is if people used things like:
> > >
> > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert --password=mypassword
> > >
> > >
> > > Such thing would be on the history file.
> > >
> > >
> > >
> > >
> > > Opt in is of course a non issue as the file would be clearly managed
> > > by the user.
> > >
> > >
> > > --
> > > Clebert Suconic
> >
> >
> >
> > --
> > Clebert Suconic
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > For additional commands, e-mail: dev-help@artemis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> For additional commands, e-mail: dev-help@artemis.apache.org
>


-- 
Clebert Suconic

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Robbie Gemmell <ro...@gmail.com>.
I would keep things simpler and just stick to providing it if you want
it, or not having it at all.

On Mon, 16 Mar 2026 at 00:33, Clebert Suconic <cl...@gmail.com> wrote:
>
> Just thought about an idea...
>
>
> I can ask the prompt at the first time the shell is running:
>
> - do you want to persist the history of commands? (Y/N)
>
>
> if Y:
>
>
> I will print a message at the start of the shell, saying that history
> of commands in this shell is preserved at (file-path-TBD)
>
> On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> <cl...@gmail.com> wrote:
> >
> > I am adding the possibility to enable a history of commands on ./artemis shell
> >
> >
> > Currently I'm enabling this as optional, as you would have to do:
> >
> > ./artemis shell --history my-file.txt
> >
> >
> >
> > you can see the PR at https://github.com/apache/artemis/pull/6297 ..
> > .as it's pretty simple.
> >
> >
> >
> > The question I have is if I should use a default file (or even allow
> > having a default file)?
> >
> > if I allowed a default file, where should we keep it?
> >
> >
> > The issue why I didn't do it automatically is if people used things like:
> >
> > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert --password=mypassword
> >
> >
> > Such thing would be on the history file.
> >
> >
> >
> >
> > Opt in is of course a non issue as the file would be clearly managed
> > by the user.
> >
> >
> > --
> > Clebert Suconic
>
>
>
> --
> Clebert Suconic
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> For additional commands, e-mail: dev-help@artemis.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Domenico Francesco Bruscino <br...@gmail.com>.
I agree on enabling the history feature as optional to prevent
potential leaks of sensitive data. I’m in favor of the --history flag;
additionally, Artemis shell could support a new environment variable
(e.g., ARTEMIS_HISTFILE=/dev/null) within artemis-utility.profile for
better configuration flexibility."

Domenico

On Mon, 16 Mar 2026 at 16:30, Justin Bertram <jb...@apache.org> wrote:
>
> For comparison, Bash stores command history in ~/.bash_history and it
> also preserves passwords. We should support a no-echo version of the
> "mask" command so users never have to enter passwords in plain-text.
> Then they can use the masked password in all their commands, or
> perhaps set credentials in the shell session so commands will simply
> inherit them.
>
>
> Justin
>
> On Sun, Mar 15, 2026 at 7:33 PM Clebert Suconic
> <cl...@gmail.com> wrote:
> >
> > Just thought about an idea...
> >
> >
> > I can ask the prompt at the first time the shell is running:
> >
> > - do you want to persist the history of commands? (Y/N)
> >
> >
> > if Y:
> >
> >
> > I will print a message at the start of the shell, saying that history
> > of commands in this shell is preserved at (file-path-TBD)
> >
> > On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> > <cl...@gmail.com> wrote:
> > >
> > > I am adding the possibility to enable a history of commands on ./artemis shell
> > >
> > >
> > > Currently I'm enabling this as optional, as you would have to do:
> > >
> > > ./artemis shell --history my-file.txt
> > >
> > >
> > >
> > > you can see the PR at https://github.com/apache/artemis/pull/6297 ..
> > > .as it's pretty simple.
> > >
> > >
> > >
> > > The question I have is if I should use a default file (or even allow
> > > having a default file)?
> > >
> > > if I allowed a default file, where should we keep it?
> > >
> > >
> > > The issue why I didn't do it automatically is if people used things like:
> > >
> > > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert --password=mypassword
> > >
> > >
> > > Such thing would be on the history file.
> > >
> > >
> > >
> > >
> > > Opt in is of course a non issue as the file would be clearly managed
> > > by the user.
> > >
> > >
> > > --
> > > Clebert Suconic
> >
> >
> >
> > --
> > Clebert Suconic
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> > For additional commands, e-mail: dev-help@artemis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> For additional commands, e-mail: dev-help@artemis.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Justin Bertram <jb...@apache.org>.
For comparison, Bash stores command history in ~/.bash_history and it
also preserves passwords. We should support a no-echo version of the
"mask" command so users never have to enter passwords in plain-text.
Then they can use the masked password in all their commands, or
perhaps set credentials in the shell session so commands will simply
inherit them.


Justin

On Sun, Mar 15, 2026 at 7:33 PM Clebert Suconic
<cl...@gmail.com> wrote:
>
> Just thought about an idea...
>
>
> I can ask the prompt at the first time the shell is running:
>
> - do you want to persist the history of commands? (Y/N)
>
>
> if Y:
>
>
> I will print a message at the start of the shell, saying that history
> of commands in this shell is preserved at (file-path-TBD)
>
> On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
> <cl...@gmail.com> wrote:
> >
> > I am adding the possibility to enable a history of commands on ./artemis shell
> >
> >
> > Currently I'm enabling this as optional, as you would have to do:
> >
> > ./artemis shell --history my-file.txt
> >
> >
> >
> > you can see the PR at https://github.com/apache/artemis/pull/6297 ..
> > .as it's pretty simple.
> >
> >
> >
> > The question I have is if I should use a default file (or even allow
> > having a default file)?
> >
> > if I allowed a default file, where should we keep it?
> >
> >
> > The issue why I didn't do it automatically is if people used things like:
> >
> > Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert --password=mypassword
> >
> >
> > Such thing would be on the history file.
> >
> >
> >
> >
> > Opt in is of course a non issue as the file would be clearly managed
> > by the user.
> >
> >
> > --
> > Clebert Suconic
>
>
>
> --
> Clebert Suconic
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
> For additional commands, e-mail: dev-help@artemis.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org


Re: [DISCUSS] Default History on Shell

Posted by Clebert Suconic <cl...@gmail.com>.
Just thought about an idea...


I can ask the prompt at the first time the shell is running:

- do you want to persist the history of commands? (Y/N)


if Y:


I will print a message at the start of the shell, saying that history
of commands in this shell is preserved at (file-path-TBD)

On Sat, Mar 14, 2026 at 2:23 PM Clebert Suconic
<cl...@gmail.com> wrote:
>
> I am adding the possibility to enable a history of commands on ./artemis shell
>
>
> Currently I'm enabling this as optional, as you would have to do:
>
> ./artemis shell --history my-file.txt
>
>
>
> you can see the PR at https://github.com/apache/artemis/pull/6297 ..
> .as it's pretty simple.
>
>
>
> The question I have is if I should use a default file (or even allow
> having a default file)?
>
> if I allowed a default file, where should we keep it?
>
>
> The issue why I didn't do it automatically is if people used things like:
>
> Apache Artemis 2.53.0-SNAPSHOT > connect --user=clebert --password=mypassword
>
>
> Such thing would be on the history file.
>
>
>
>
> Opt in is of course a non issue as the file would be clearly managed
> by the user.
>
>
> --
> Clebert Suconic



-- 
Clebert Suconic

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@artemis.apache.org
For additional commands, e-mail: dev-help@artemis.apache.org