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 <[email protected]>
wrote:

> I meant to say.. inputPassword already does not save anything.
>
> On Mon, Mar 16, 2026 at 1:10 PM Clebert Suconic
> <[email protected]> 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
> > <[email protected]> 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 <
> [email protected]> 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
> > > > <[email protected]> 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: [email protected]
> > > > For additional commands, e-mail: [email protected]
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
> > >
> >
> >
> > --
> > Clebert Suconic
>
>
>
> --
> Clebert Suconic
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to