]> git.ipfire.org Git - thirdparty/util-linux.git/commit
bash-completion/umount: shell charaters escape
authorEtienne Mollier <etienne.mollier@mailoo.org>
Thu, 21 May 2020 15:20:18 +0000 (17:20 +0200)
committerEtienne Mollier <etienne.mollier@mailoo.org>
Thu, 21 May 2020 15:44:22 +0000 (17:44 +0200)
commit2c12297400859d012b101c049e328eb19f705fe8
tree13db3dde6919dd1bfffdb1ea64271766e2ff73cf
parent83fdb880b953164fec7cc603c4ece11cb78762db
bash-completion/umount: shell charaters escape

This patch brings support for automatic dangerous shell characters
escape in umount autocompletion.  Due to the very peculiar way for
bash to handle autocompletion routines, proper escaping of the shell
sequences only worked properly inside a function: _umount_point_list,
which will add to the user's namespace at the next umount attempt of
autocompleting mount point.

It also translates calls of gensub to the portable alternatives sub
and gsub, in order to allow the use of various awk implementations
(mawk, Gnu, Busybox, etc), and as such kind of undoes a recent change
to enforce the use of Gnu awk. The whole story landed into the Debian
BTS initially:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933934

PS: It's been a few months since the patch is available, sorry for the
    delay; I only got myself a Github account quite recently...

Signed-off-by: Étienne Mollier <etienne.mollier@mailoo.org>
bash-completion/umount