Index | Thread | Search

From:
Steffen Nurpmeso <steffen@sdaoden.eu>
Subject:
Re: bin/ksh: add bash-like expand-tilde option
To:
tech@openbsd.org
Date:
Fri, 24 Apr 2026 22:51:17 +0200

Download raw body.

Thread
Kirill A. Korinsky wrote in
 <87tst06uss.wl-kirill@korins.ky>:
 |tech@,
 |
 |default ksh completion already matches bash with expand-tilde enabled:
 |typing ~/sr and pressing TAB expands and completes the word to
 |/home/user/src.
 |
 |Here a new option expand-tilde which using the bash name, but keep
 |current ksh behaviour by enabling it by default.
 |
 |Disabling the option preserves the original ~ prefix, so the same input
 |completes to ~/src.

(Sorry for the noise -- i have not tried the patch --
"expand-tilde" is a setting of the readline(3) library, and it
affects quite a lot of programs on my box.  Indeed, i keep the
default, "off".
But still i do not get your explanation from last time.
If you hit TAB -- with bash -- the only difference is whether
$HOME (of X) is expanded, or not.  You still get the complete file
list right away:

  $ bind 'set expand-tilde on'
  $ echo ~/.a<TAB>
  .a   .ax
  $ echo /home/steffen/.a

  $ bind 'set expand-tilde off'
  $ echo ~/.a
  .a   .ax
  $ echo ~/.a

So it seems to me that flow is the actual difference,
"expand-tilde" has nothing to do with that.

(To remark that my MUA does it the very same way, ie, the first
TAB expands $HOME (of X), only the second TAB shows the .a* glob
result.  Maybe that should be fixed .. hmmm.)

And yes, sorry, i did not actually understand what you have said,
but you did not follow up either, so.)

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)