Subject: Re: bug#31495: 26.1; filename completion -vs- "*"

From: Tino Calancha <[email-masked]>
Date: Sun, 20 May 2018 11:19:37 +0900

Michael Albinus <[email-masked]> writes:

> Tino Calancha <[email-masked]> writes:
>
> Hi Tino,
>
>> We could even let the user enable globstar in those shells supporting
>> it but having it disable by default (e.g. bash).
>
> What about ls-lisp?
It would be great to have there but it's out of the
scope of the patch yet.   This is not about add a new dired
feature.  Instead, the target is to turn on a
feature from your shell that is disabled by default.

If you use em-ls you have this feature.  Same as if you use
external program `ls' from zsh or fish shells.
The idea is to let users if they want to enable globstar
in their shell when its disabled by default.

>> +(defconst dired-enable-globstar-in-shell
>> +  '(("ksh" . "set -G")
>> +    ("bash" . "shopt -s globstar"))
>> +  "Alist of (SHELL . COMMAND), where COMMAND enables globstar in SHELL.
>> +If `dired-maybe-use-globstar' is non-nil, then `dired-insert-directory'
>> +checks this alist to enable globstar in the shell subprocess.")
>
> This works only if the shell name like bash or ksh is used. Often, just
> /bin/sh is used, and you don't know which real shell this file is linked to.
My patch use `file-truename' to get the actual shell
used by `dired-insert-directory'.