bash vs dash
jiafu_gao at yahoo.com
Mon Aug 4 16:03:36 BST 2008
Thanks for the those who offered helps. I found the following link that is very helpful:
Note that there is only ash, not dash in the list. Since dash comes from ash, I assume the features for them are the same.
I really like the lightweightness of dash on PS3. However, I missed these features in bash (in order of importance):
1) command line editing
2) tab completion
3) command history
4) customized prompt
If we can get these features add to dash with minimal impact on its compactness, I will be a happy dash user, and I believe more users will be less dash-resistance.
As for 1), this is from the manual page:
-V vi' Enable the built-in vi(1) command line editor (disables -E if it has been set).
I am not sure it means for command line editing. Anyway, I could not get it work.
As for 4), dash actually has some limited support in the form of env variable PS1. I've written a small program (bashps - bash style prompt string) to make it possible to use bash style prompt (such as '\u@\h:\w\$ ') in dash without any change to dash itself. Just run the following command:
> export PS1 = "$(bashps '\u@\h:\w\$ ')"
If any one has any "smart" idea to add 2), 3) to dash without change to dash or with minimal change (in term code size), I will be happy to hear.
----- Original Message ----
From: John Dong <jdong at ubuntu.com>
To: Jiafu Gao <jiafu_gao at yahoo.com>
Cc: ubuntu-motu at lists.ubuntu.com
Sent: Saturday, August 2, 2008 8:26:05 PM
Subject: Re: bash vs dash
dash is a minimal shell that is primarily meant to meet POSIX bourne shell standards (i.e. BSD's /bin/sh). It doesn't support autocompletion or command history.
On Fri, Aug 1, 2008 at 6:25 PM, Jiafu Gao <jiafu_gao at yahoo.com> wrote:
I am trying to find out the feature differenece between bash and dash. The internet does not help much. man dash goes to manual page for sh. Is this information available at all?
Specifically, I like to know if dash support:
1) autocompletion (of command)
2) command history
Thanks for any help.
Ubuntu-motu mailing list
Ubuntu-motu at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ubuntu-motu