gio/completion/gio: Some variables are not localized
When using tab completion with gio
in Bash, some non-localized variables in the completion script also appear in the current user's shell environment. This may clobber variables that the user is using for other purposes, which is undesirable.
For example, if I try to use tab completion with gio trash ~/Pictures/Screenshot_2020-04-
(where Screenshot_2020-04-
is the prefix of a screenshot), non-localized variables like i
, mount
, name
, etc. from the completion script then appear in my environment:
$ gio ~/Pictures/Screenshot_2020-04- # Tab is pressed here; output from completion omitted
$ tail -7 <(set -o posix; set)
i=2
mount=
name=
path='~/Pictures/Webcam/'
size=
type=
unescaped_dir=/home/dongsibo/Pictures/
- GLib version
- 2.66.4-1
- Operating system
- Arch Linux