[1.16.2] A couple of issues with hush

Denys Vlasenko vda.linux at googlemail.com
Fri May 6 14:32:09 UTC 2011


On Fri, May 6, 2011 at 10:09 AM, Gilles <codecomplete at free.fr> wrote:
> Hello
>
>        Since it's the recommended option, I included the hush shell in
> Busybox to run on uClinux, and have a couple of issues with it:
>
> 1. I get "^[[A" when hitting the up arrow to use a command previously
> typed. Generally speaking, the arrow keys don't work
>
> 2. Hitting the TAB key doesn't provide path completion

Post your .config.
I guess your CONFIG_FEATURE_EDITING is off.

> 3. When I'm in eg. /etc, the prompt simply says "/etc #" while
> /etc/profile includes PS1='\u:\w> ', ie. username + current directory.

Likely CONFIG_FEATURE_EDITING_FANCY_PROMPT is off.
I just tested and it works for me with that option on.

> I guess hush doesn't read /etc/profile?

It does if it is a login shell (=> if it is run with argv[0] = "-/path/to/hush",
with leading dash. bash-like option --login isn't supported (yet?)).

> I'm told I might not have chosen the right options in Buildroot, but I
> have no idea what to choose. Here are the options I checked:
> ====================
> #Don't build an independent shell: Use Busybox
> Core Applications
> Shell Program (other)  --->
>
> BusyBox  --->
> Choose your default shell (hush)  --->
> --- hush
> [*]   bash-compatible extensions
> [ ]   help builtin
> [*]   Interactive mode
> [ ]     Job control
> [ ]   Process substitution
> [*]   Support if/then/elif/else/fi
> [*]   Support for, while and until loops
> [*]   Support case ... esac statement
> [*]   Support funcname() { commands; } syntax
> [ ]     Support local builtin
> [*]   Support export '-n' option
> [ ]   Pseudorandom generator and $RANDOM variable
> [ ] lash (deprecated: aliased to hush)
> [ ] msh (deprecated: please use hush)
> [*] POSIX math support
> [ ]   Extend POSIX math support to 64 bit
> [ ] Hide message on interactive shell startup
> [ ] cttyhack

This is only a small part of the configuration.
Post entire .config file please.
-- 
vda


More information about the busybox mailing list