1681 Commits

Author SHA1 Message Date
Ville Skyttä
40c764af57 _filedir: Avoid some unnecessary work with -d 2015-05-11 00:19:57 +03:00
Ville Skyttä
80c2bb6964 _filedir: Remove unused variable 2015-02-20 14:32:02 +02:00
Ville Skyttä
d2920b7e79 _filedir: Fix overquoted argument to compgen -d (RedHat: #1171396) 2015-02-19 22:04:38 +02:00
Ville Skyttä
d423969756 2015 2015-02-17 21:33:00 +02:00
Ville Skyttä
1d25d72ca8 Load user completions from $BASH_COMPLETION_USER_DIR/completions
Fall back to XDG_DATA_HOME/bash-completion/completions or
~/.local/share/bash-completion/completions if not set.

Thanks to Raphaël Droz.
2015-02-16 22:17:34 +02:00
Ville Skyttä
edea6cb6da tune2fs: Add missing return in -M arg completion 2015-02-03 07:56:44 +02:00
Peter Cordes
3567d9354f upstart support for service completion
initctl list works for unprivileged users.

Wasn't sure what file to check to detect that upstart was present, but
/sbin should always be mounted, and upstart itself provides
/sbin/upstart-udev-bridge, and it's not a conffile in /etc that someone
could move if they wanted to on their local system.  upstart-dbus-bridge
isn't present on Ubuntu 12.04, but socket and udev bridge both are.
(Do Debian kFreeBSD or GNU/Hurd have udev?  nvm, Debian kFreeBSD doesn't
ship upstart at all.)

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/lucid/upstart/lucid-updates/view/head:/debian/changelog
indicates that the udev bridge existed as far back as Ubuntu 10.04
(Lucid), and might have been the first bridge.  udev is probably here to stay, so use that, even udev is Linux only, unlike sockets.

 Another possiblity would be to check /usr/share/man/man7/upstart.7.gz,
but that looks brittle.

 I think it's important to check that the system is using an upstart init,
so you don't run initctl when completing in a root shell on another kind
of system.  At worst, reboots, at best generates system log messages.
2014-12-17 14:41:39 +02:00
Ville Skyttä
6a60025e01 chrome, firefox etc: Complete on *.pdf 2014-12-15 12:03:02 +02:00
Ville Skyttä
32e6e49088 _completion_loader: Protect compgen from -* leakage (Debian: #769399) 2014-11-15 21:37:47 +02:00
Ville Skyttä
52d8316c5c _pnames: Add -s for producing (possibly) truncated names (RedHat: #744406)
pgrep and pkill actually expect these instead of the full names.
2014-11-10 22:36:49 +02:00
Ville Skyttä
882649b712 Protect various compgen invocations from -* leakage (Debian: #766163) 2014-11-01 21:48:35 +02:00
Ville Skyttä
4038c71357 pigz, unpigz: Handle *.zz 2014-09-17 19:40:02 +03:00
Barry Warsaw
a9c556ccad _init_completion: Handle cword < 0 (LP: #1289597)
Previously only bash 4.3 seemed to provoke this, but now with the
empty command consistency tweak it occurs with earlier as well.
2014-09-17 19:36:08 +03:00
Ville Skyttä
7394d744ae _completion_loader: Set empty command to _EmptycmD_ for cross version compat
bash 4.3 gives us _EmptycmD_ for empty commands, while earlier
versions give us the empty string; set it to _EmptycmD_ for those as
well for consistency.
2014-09-17 19:22:56 +03:00
Ville Skyttä
fa064e8563 Comment update 2014-09-17 19:18:45 +03:00
Ville Skyttä
852e0f60f0 mplayer, *xine: Complete on *.mts (Debian: #759219) 2014-08-29 19:32:03 +03:00
Damien Nadé
d238ab5445 _parse_help: Fix failglob failures (Alioth: #314707) 2014-06-09 01:46:50 +04:00
Ville Skyttä
b65232fa34 _filedir_xspec: Fix with failglob on 2014-06-07 12:15:02 +03:00
Dams Nadé
84135d756b Quote unset array element to avoid globbing interference (Alioth: #314708) 2014-06-03 22:52:18 +03:00
Ville Skyttä
732906b250 __reassemble_comp_words_by_ref: Make work with failglob on (Alioth: #312741)
Based on a patch from Dams Nadé <alioth@livna.org>
2014-06-02 17:09:16 +03:00
Ville Skyttä
41cdfc6510 _services: README in sysv init dir is not a service 2014-06-02 16:49:59 +03:00
Ville Skyttä
e452f2e8d6 cal,chfn,chsh,dmesg,eject,hexdump,look,newgrp,renice,runuser,su,write: Deprecate on Linux in favor of util-linux ones (Debian: #737672) 2014-02-08 19:35:48 +02:00
Ville Skyttä
e201d1be7e _*: Install our deprecated completions too, try loading them secondarily 2014-02-08 15:33:10 +02:00
Ville Skyttä
01fd3b4f55 Bump copyright years to 2014. 2014-01-21 20:01:43 +02:00
Ville Skyttä
fcc9545b44 _known_hosts_real: Exclude %h HostName entries (RedHat: #1015935). 2013-10-07 20:06:15 +03:00
Ville Skyttä
50ae579273 _known_hosts_real: Pre-expand \t instead of relying on sed supporting it (Alioth: #314393). 2013-08-26 20:44:46 +03:00
Igor Murzov
a282d0254c _longopt: Run commands in C locale.
This is a follow-up to commit 822735146f
2013-08-14 12:04:33 +04:00
Ville Skyttä
3f144beb72 export, _variables: Do TZ= completion (Redhat: #994646).
Could do this for env, declare, and typeset as well, especially
when/if we have more known env vars implemented in _variables.
2013-08-08 12:49:11 +03:00
Ville Skyttä
d99c2203b9 Clean up/compact various globs. 2013-05-09 13:42:32 +03:00
Ville Skyttä
497c20902a Use == instead of =. 2013-04-08 23:04:11 +03:00
Thilo Six
a9db458339 _mac_addresses: Use explicit C locale for ifconfig (Debian: #704832). 2013-04-06 21:11:54 +03:00
David Paleino
3085c7e121 Releasing 2.1 2013-04-05 12:54:58 +02:00
Ville Skyttä
f0a3147179 unzip/zipinfo: Associate with more StarOffice extensions. 2013-03-27 21:02:54 +02:00
Ville Skyttä
7afc97366f patch: New full featured completion. 2013-03-24 22:59:29 +02:00
AllKind
e191799dea Fix __ltrim_colon_completions() fail on parameter (\$1) containing a glob. 2013-03-09 15:30:01 +04:00
Ville Skyttä
eef7941842 _available_interfaces: Try with "ip link" if ifconfig is N/A also with -a. 2013-02-04 17:27:07 +02:00
Ville Skyttä
a77d3d5505 pyflakes: New completion. 2013-02-02 10:37:22 +02:00
Ville Skyttä
3064e9d707 _available_interfaces: Without -a, try with "ip link" if ifconfig is N/A. 2013-02-01 20:40:49 +02:00
Ville Skyttä
aa516acdc5 _ip_addresses: Try with "ip addr" if ifconfig is not available. 2013-02-01 20:27:07 +02:00
Ville Skyttä
b78ef321be _mac_addresses: Try local interfaces with "ip link" if ifconfig is N/A. 2013-02-01 20:17:03 +02:00
Ville Skyttä
87dede96c0 _mac_addresses: Try ARP cache with "ip neigh" if arp is not available. 2013-02-01 19:43:21 +02:00
Ville Skyttä
f6df76e8ca _mac_addresses: Fix with net-tools' ifconfig that outputs ether, not HWaddr. 2013-02-01 19:43:18 +02:00
Ville Skyttä
c4cc3eb63b Brown paper bag fix for the previous commit. 2013-01-25 00:19:23 +02:00
Ville Skyttä
fea1c178b4 Avoid sourcing dirs in completion loader to avoid fd leaks (RedHat: #903540). 2013-01-25 00:07:29 +02:00
Ville Skyttä
f917b750dd _known_hosts_real: Filter ruptime stdout error spewage (Alioth: #313893). 2012-11-06 21:55:57 +02:00
Igor Murzov
3b93c22a5b Update copyright year and release number. 2012-11-06 16:50:48 +04:00
Igor Murzov
2472fad5de _command_offset: Restore compopts properly (Alioth: #313890)
This commit is basicaly a more robust version of 5051b1787a, which made
invalid assumptions about a completion specification.
2012-11-06 16:36:52 +04:00
Igor Murzov
97eb4daa62 zathura: Add simple completion for zathura document viewer. 2012-11-03 19:43:30 +04:00
Igor Murzov
e29c6bc872 wget: New completion.
Initial patch by: Raphaël Droz <raphael.droz@gmail.com>
2012-10-20 19:59:28 +04:00
Igor Murzov
822735146f _parse_help, _parse_usage: Run commands in C locale.
This avoids divergence of options for a localized and non-localized
versions of programs. _parse_help may even get into infinite loop
with localized input.
2012-09-06 18:16:44 +04:00