diff options
author | John R. Lenton <jlenton@gmail.com> | 2016-11-30 09:28:27 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-02-22 18:11:43 +0100 |
commit | 2dec4c01b4d2a73c7abe0a22cde2937af4c731ec (patch) | |
tree | 4b2da5b0b0615f550a3611e368b99303930d1b95 /COPYING | |
parent | 565dd14806e5cf130ebffc8755d1d9838b7fb828 (diff) |
bash-completion: Only complete understood file paths for install
Previouosly apt's bash completion was such that, given
$ mkdir xyzzz
$ touch xyzzy.deb xyzzx.two.deb
you'd get
$ apt install xyzz<tab>
xyzzx.two.deb xyzzz/
$ apt install /tmp/foo/xyzz<tab>
xyzzx.two.deb xyzzz/
this is inconsistent (xyzzx.two.deb is listed but not xyzzy.deb), but
worse than that it offered things that apt would not actually
recognise as candidates for install:
$ sudo apt install xyzzx.two.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package xyzzx.two.deb
E: Couldn't find any package by glob 'xyzzx.two.deb'
E: Couldn't find any package by regex 'xyzzx.two.deb'
With this small (trival, really) change, apt's bash completion will
only offer things apt understands, and won't recquire an aditional
period in the filename to offer it:
$ apt install xyzz<tab>^C
$ # (no completions!)
$ apt install ./xyzz<tab>
xyzzx.two.deb xyzzy.deb xyzzz/
$ apt install /tmp/foo/xyzz
xyzzx.two.deb xyzzy.deb xyzzz/
fixes #28
LP: #1645815
(cherry picked from commit 6761dae5d0c372d132b0df91753120b59e30fd0e)
(cherry picked from commit 3c49cc213c9a7747a943419acc2939eb4215b8ef)
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions