CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]  2026/05/22 12:11:08

Modified files:
        bin/ksh        : edit.c edit.h emacs.c vi.c 

Log message:
bin/ksh: preserve tildes in completion

Keep leading tilde expressions in the command line after file
completion. Expanding ~user to pw_dir during editing bakes the result of
an early passwd lookup into the command line; if the account changes
before the command is executed, the command uses a stale pathname
instead of the current ~user expansion.

Completion still performs the lookup needed to enumerate pathname
matches, but rewrites matches back to the spelling the user typed and
does not leave a completion only lookup in the homedir cache.

Also complete bare ~user prefixes from the passwd database, so ~us[TAB]
can become ~user before pathname completion continues.

Preserving tilde is the default behaviour.

OK: deraadt@

Reply via email to