dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* --with-libedit as default
@ 2013-08-04  0:39 Maurício Antunes
  2013-08-04  1:02 ` Jonathan Nieder
  0 siblings, 1 reply; 9+ messages in thread
From: Maurício Antunes @ 2013-08-04  0:39 UTC (permalink / raw)
  To: dash

Hi,

I would like to suggest this: do you think in its next version dash could
enable libedit by default, instead of requiring it to be explicitly
requested when running the configure script? The reason why I think
it's a good idea is because this is what Posix demands, and many linux
distributions forget to add that option (maybe because they see dash
just as an efficient tool for scripts, not as a nice login shell).

Thanks. Best,
Maurício

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: --with-libedit as default
  2013-08-04  0:39 --with-libedit as default Maurício Antunes
@ 2013-08-04  1:02 ` Jonathan Nieder
  2013-08-04  5:11   ` Maurício Antunes
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Nieder @ 2013-08-04  1:02 UTC (permalink / raw)
  To: Maurício Antunes; +Cc: dash, 524839

Hi,

Maurício Antunes wrote:

>                                              The reason why I think
> it's a good idea is because this is what Posix demands, and many linux
> distributions forget to add that option (maybe because they see dash
> just as an efficient tool for scripts, not as a nice login shell).

If you're thinking of Debian, it's not forgetfulness that causes
them not to include the option. ;-)

Can you say a little more about why the option should be enabled in
distributions?  Do you use dash as an interactive shell?  Currently
the dash package tries to be pretty small for the sake of minimal
systems.  A build using readline (since that library is already part
of the base system) might make sense, or it might make sense to bite
the bullet and use libedit (which is after all only about 150 KiB).

Thanks and hope that helps,
Jonathan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: --with-libedit as default
  2013-08-04  1:02 ` Jonathan Nieder
@ 2013-08-04  5:11   ` Maurício Antunes
  2013-08-04  9:43     ` Seb
  0 siblings, 1 reply; 9+ messages in thread
From: Maurício Antunes @ 2013-08-04  5:11 UTC (permalink / raw)
  To: dash

2013/8/3, Jonathan Nieder <jrnieder@gmail.com>:
> Hi,
>
> Maurício Antunes wrote:
>
>>                                              The reason why I think
>> it's a good idea is because this is what Posix demands, and many linux
>> distributions forget to add that option (maybe because they see dash
>> just as an efficient tool for scripts, not as a nice login shell).
>
> If you're thinking of Debian, it's not forgetfulness that causes
> them not to include the option. ;-)
>
> Can you say a little more about why the option should be enabled in
> distributions?  Do you use dash as an interactive shell?  Currently
> the dash package tries to be pretty small for the sake of minimal
> systems.  A build using readline (since that library is already part
> of the base system) might make sense, or it might make sense to bite
> the bullet and use libedit (which is after all only about 150 KiB).

Oh, I didn't know about that. I don't usually deal with system with
minimal resources.

I would like to use dash as an interactive shell. My motivation isn't
anything more serious than the fact that it has a small documentation,
which I can read and understand easily. Maybe my own memory is the limited
resource with which I have to deal :) My current shell uses tree  or
four initialization files, and I can never remember which one is read
when. Dash has only one (.profile). I like that.

Maurício

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: --with-libedit as default
  2013-08-04  5:11   ` Maurício Antunes
@ 2013-08-04  9:43     ` Seb
  2013-08-04 16:21       ` Maurício Antunes
  0 siblings, 1 reply; 9+ messages in thread
From: Seb @ 2013-08-04  9:43 UTC (permalink / raw)
  To: Maurício Antunes; +Cc: dash

Le Sun, 4 Aug 2013 02:11:25 -0300
Maurício Antunes a écrit:

> I would like to use dash as an interactive shell. My motivation isn't
> anything more serious than the fact that it has a small documentation,
> which I can read and understand easily. Maybe my own memory is the limited
> resource with which I have to deal :) 

The problem is that enabling the libedit support does not provide you
with auto-completion, AFAIK. This makes it very painful for a use
as a daily interactive shell, isn't it?

Plus, regarding the documentation, all the shells around claim to
comply with POSIX, so you can stick with the dash man page and use
another shell, it will work 90% of the time. You can also directly
refer to the standard:

  http://pubs.opengroup.org/onlinepubs/9699919799/utilities/toc.html

> My current shell uses tree  or
> four initialization files, and I can never remember which one is read
> when. Dash has only one (.profile). I like that.

In fact, dash uses two files: .profile, when you use it as a login
shell, and the file pointed in the ENV environment variable, used in
all invokations as interactive shell. So, it is the same scheme as
bash with .bash_profile and .bashrc.

++
Seb.

P-S. I would also like to use dash as my main shell (not just to
test script portability). I currently use mksh, which seemed to me a
good compromise: smaller and faster than bash, reasonnable
auto-completion support, path facilities (e.g. "ls -d /{e,b}*"), a
good support for UTF-8, and the ability to deal with many
bashisms/kornisms when you really need it:

  https://www.mirbsd.org/mksh.htm

You can also glance the ash in Busybox, which also provides
auto-completion, and is a fork of dash. Just build the ash applet to
get a ~80K shell:

  http://www.busybox.net/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: --with-libedit as default
  2013-08-04  9:43     ` Seb
@ 2013-08-04 16:21       ` Maurício Antunes
  2013-08-04 17:09         ` Seb
                           ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Maurício Antunes @ 2013-08-04 16:21 UTC (permalink / raw)
  To: dash

>> I would like to use dash as an interactive shell.

> The problem is that enabling the libedit support does not provide you
> with auto-completion, AFAIK.

You're right, just tested it.

What would it take to have auto-completion in dash
(even if disabled by default)?

>   http://pubs.opengroup.org/onlinepubs/9699919799/utilities/toc.html
>   https://www.mirbsd.org/mksh.htm
>   http://www.busybox.net/

Thanks for the tips. I'll try them.

Maurício

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: --with-libedit as default
  2013-08-04 16:21       ` Maurício Antunes
@ 2013-08-04 17:09         ` Seb
  2013-08-04 22:46           ` Roy Tam
  2013-08-04 17:18         ` Harald van Dijk
  2013-08-05  0:16         ` Paul Gilmartin
  2 siblings, 1 reply; 9+ messages in thread
From: Seb @ 2013-08-04 17:09 UTC (permalink / raw)
  To: Maurício Antunes; +Cc: dash

Le Sun, 4 Aug 2013 13:21:37 -0300
Maurício Antunes a écrit:

> What would it take to have auto-completion in dash
> (even if disabled by default)?

You'll need to implement it, using the libedit API, I think (there
are some examples in the "examples" directory, at the root of its
source archive). I'm rather a poor C coder, so I can't tell if it
will be difficult or not (probably not trivial, as nobody's ever done
it).

++
Seb.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: --with-libedit as default
  2013-08-04 16:21       ` Maurício Antunes
  2013-08-04 17:09         ` Seb
@ 2013-08-04 17:18         ` Harald van Dijk
  2013-08-05  0:16         ` Paul Gilmartin
  2 siblings, 0 replies; 9+ messages in thread
From: Harald van Dijk @ 2013-08-04 17:18 UTC (permalink / raw)
  To: Mauricio Antunes; +Cc: dash

On 04/08/13 18:21, Mauricio Antunes wrote:
>>> I would like to use dash as an interactive shell.
> 
>> The problem is that enabling the libedit support does not provide you
>> with auto-completion, AFAIK.
> 
> You're right, just tested it.
> 
> What would it take to have auto-completion in dash
> (even if disabled by default)?

libedit does provide auto completion hooks, but it is up to the end
program to make use of that, and determine whether completion should
search for commands, files, variables, anything else. libedit includes
an example called fileman, that includes path-based completion. It might
be interesting to see if that is easily adaptable to dash.

(My apologies for removing the accent from your name. My mail server is
corrupting the message with non-ASCII characters in a way that causes
the mailing list server to reject it. I will attempt to get that fixed.)

Cheers,
Harald

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: --with-libedit as default
  2013-08-04 17:09         ` Seb
@ 2013-08-04 22:46           ` Roy Tam
  0 siblings, 0 replies; 9+ messages in thread
From: Roy Tam @ 2013-08-04 22:46 UTC (permalink / raw)
  To: Seb; +Cc: Maurício Antunes, dash

2013/8/5 Seb <sbb@tuxfamily.org>:
> Le Sun, 4 Aug 2013 13:21:37 -0300
> Maurício Antunes a écrit:
>
>> What would it take to have auto-completion in dash
>> (even if disabled by default)?
>
> You'll need to implement it, using the libedit API, I think (there
> are some examples in the "examples" directory, at the root of its
> source archive). I'm rather a poor C coder, so I can't tell if it
> will be difficult or not (probably not trivial, as nobody's ever done
> it).
>

Or try porting function from NetBSD libedit and /bin/sh.

> ++
> Seb.
> --
> To unsubscribe from this list: send the line "unsubscribe dash" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: --with-libedit as default
  2013-08-04 16:21       ` Maurício Antunes
  2013-08-04 17:09         ` Seb
  2013-08-04 17:18         ` Harald van Dijk
@ 2013-08-05  0:16         ` Paul Gilmartin
  2 siblings, 0 replies; 9+ messages in thread
From: Paul Gilmartin @ 2013-08-05  0:16 UTC (permalink / raw)
  To: dash

On 2013-08-04, at 10:21, Maurício Antunes wrote:

>>> I would like to use dash as an interactive shell.
> 
>> The problem is that enabling the libedit support does not provide you
>> with auto-completion, AFAIK.
> 
> You're right, just tested it.
> 
> What would it take to have auto-completion in dash
> (even if disabled by default)?
>  
Here, I'll be a POSIX fanatic.  I believe POSIX requires
command line editing; not auto-completion.  POSIX provides
a usually clear although not satisfactory to all line of
demarcation between standard function and bloat.

    http://aleksan.wordpress.com/2008/01/07/the-camels-nose-fable-a-favourite-for-teaching-about-setting-limits/

-- gil


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-05  0:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-04  0:39 --with-libedit as default Maurício Antunes
2013-08-04  1:02 ` Jonathan Nieder
2013-08-04  5:11   ` Maurício Antunes
2013-08-04  9:43     ` Seb
2013-08-04 16:21       ` Maurício Antunes
2013-08-04 17:09         ` Seb
2013-08-04 22:46           ` Roy Tam
2013-08-04 17:18         ` Harald van Dijk
2013-08-05  0:16         ` Paul Gilmartin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).