From: Benoit RAT <benoit@sevensols.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: menu autodisplay does not work
Date: Fri, 1 Jun 2012 10:33:31 +0200 [thread overview]
Message-ID: <CAHvDM_dU_O+k+=jJ413LypC-q1PsW-znXO89giRRLJjmmOvy+w@mail.gmail.com> (raw)
In-Reply-To: <20120531200834.GE30400@pengutronix.de>
[-- Attachment #1.1: Type: text/plain, Size: 4028 bytes --]
I think this is not a bug, it's the documentation that is not clear
here. The above is only useful in conjunction with -A in which case
the description given with -d is shown as timeout text.
It is what I thought but even with the -A option it doesn't work:
menu -m test -s -A 10 -d "test2"
test menu
1: test1
2: test2
3: test3
test2 8
So test2 is correctly selected for timeout (test2 8) but when the countdown
terminate I obtain
1
WRS-3> /
this means that the command executed is test1
Moreover, I think it should be usefull to have a -A infinite timeout
options with a preselect option to help someone choose the next step or the
default step.
About the -S -n <num> option I also think it is redundant but maybe someone
thought implementing -S -d <desc>
--
<http://www.sevensols.com/> <http://www.sevensecurity.es>
*Benoit RAT LAMY*
Engineer (Sw) \ Ingeniero (Sw)
fix. *(+34) 958 285 024*
cel. *(+34) 617 989 123*
e-mail: benoit@sevensols.com
*www.sevensols.com / **www.sevensecurity.es*
_________________________________
*C/ Baza, parcela 19 Nave 3 \ Polígono Ind. Juncaril \*
*18210 - PELIGROS - GRANADA –SPAIN*
On Thu, May 31, 2012 at 10:08 PM, Sascha Hauer <s.hauer@pengutronix.de>wrote:
> On Thu, May 31, 2012 at 05:25:03PM +0200, Benoit RAT wrote:
> > Hy guy,
> >
> > I found a small bug with menu autodisplay functionality that doesn't
> work:
> >
> > menu -a -m test -d "test menu"
> > menu -e -a -m test -c "echo 1" -d "test1"
> > menu -e -a -m test -c "echo 2" -d "test2"
> > menu -e -a -m test -c "echo 3" -d "test3"
> >
> > And then I try to autoselect test2 after chosing test 1
> >
> > 1
> > barebox> menu -m test -s -d "test2"
>
> I think this is not a bug, it's the documentation that is not clear
> here. The above is only useful in conjunction with -A in which case
> the description given with -d is shown as timeout text.
>
> >
> > But this does not work!
> >
> > The only way to perform this is to use
> >
> > menu -m test -S -n 2
> > menu -m test -s
>
> That's a point I do not understand. Looking at the code it's clear to me
> why this have to be two commands, but I think it should be possible to
> combine the select option with the show option. Furthermore I think the
> -S option is quite useless. -S seems to used only to let the -n option
> take effect.
>
> Overall it's not very clear which options exist and which options take
> an argument. I've collected them and here is the result:
>
> -m <menuname> specify menu to work on
> -l list existing menus
> -s show menu
> -a Add a menu or, when -e is given additionally, add a menu
> entry
> -r remove a menu
> -d <description> description, in conjunction with
> -a -e: Menu text to show
> -A: timeout text to show
> -A <delay> Autoselect selected entry in <delay> seconds
> -c <command> run <command> when an entry is selected
> -R reentrance, used with -a, do not leave the menu after
> an entry is selected
> -b 0|1 box entry. used with -a, add a yes/no entry
> -e when given with -a, add a menu entry. When given with
> -l, additionally to the menu also list the entries
> -S -n <num> select entry <num>, starting at 1. Seperate command,
> NOT together with actually showing the menu
>
> I think we should add this to the help text for the menu command, or
> even better, replace the docs and the code for -S -n <num> with a plain
> -S <num>
>
> Sascha
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
[-- Attachment #1.2: Type: text/html, Size: 8808 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2012-06-01 8:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 15:25 Benoit RAT
2012-05-31 20:08 ` Sascha Hauer
2012-06-01 8:33 ` Benoit RAT [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHvDM_dU_O+k+=jJ413LypC-q1PsW-znXO89giRRLJjmmOvy+w@mail.gmail.com' \
--to=benoit@sevensols.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox