Re: [Bashburn-info] A historical idea to throw out :-)
Brought to you by:
bashburn
|
From: Anders L. <and...@gm...> - 2008-09-17 19:55:42
|
ons 2008-09-17 klockan 14:32 -0400 skrev Steven W. Orr: > There are some places in bb where we throw a prompt and ask the user for > input, where there are a set of choices that would make sense for the user > to type in. I'm not talking about completion. Here's an example (and > there are many others): > > +--------------+ > | BashBurn 3.0 | > +--------------+ > | > +--------------+ INFORMATION +--------------+ > This option sets the language BashBurn's interface will be shown in. > The current setting is: English, and below is a list > of possible languages to choose from. > To cancel, just press [ENTER]. > +--------------+ INFORMATION +--------------+ > > Czech English German Italian Norwegian Polish Spanish Swedish > > +--------------+-------------+--------------+ > > Your Choice? |> > > Wouldn't it be nice for the user to be able to hit ^P or UpArrow and be > able to cycle through the only choices that are available? > > I just found out how to do it. (Highly abbreviated example code.) > > ls > tmpfile > history -c > history -r tmpfile > read -r -p 'Your choice? |> ' > > Does anyone hate this? > Sound good to me. Simpler and no chance of misspellings. Go for it. -- Anders Lindén http://bashburn.sf.net |