1593 Commits

Author SHA1 Message Date
Ville Skyttä
81dd740a57 vi and friends: Fix /etc/ld.so.conf.d/* completion (Alioth: #312409). 2011-11-25 20:57:03 +02:00
Ville Skyttä
3af9222e96 _parse_help, _parse_usage: If first arg is "-", read from stdin. 2011-11-25 08:45:59 +02:00
Igor Murzov
f0283e1c1b Cleanups: Make code more compact.
Drop useless spaces, backslashes, return codes, unused arguments etc.
2011-11-20 17:10:58 +03:00
Igor Murzov
03c2fe9301 _command_offset: Add missing quotes.
Fixes recently added test for valgrind.
2011-11-20 04:35:40 +03:00
Igor Murzov
43e8e2b504 wine: Complete all files after an .exe (Alioth #313131) 2011-11-17 18:35:49 +03:00
Igor Murzov
068a1a1b53 __get_cword_at_cursor_by_ref: Drop unnecessary quotes. 2011-11-17 00:11:46 +03:00
Igor Murzov
b3fcb55dcf __get_cword_at_cursor_by_ref: Add missing quotes.
Fixes  _get_comp_words_by_ref() and sftp tests (Alioth #313102).
2011-11-16 23:46:29 +03:00
Igor Murzov
1d45cfe760 __get_cword_at_cursor_by_ref: Drop unused cur2 variable. 2011-11-16 23:37:09 +03:00
Igor Murzov
6843989baf _command_offset: Do not assume that first word is unique in completion line. 2011-11-15 03:37:01 +03:00
Ville Skyttä
87d31eb85d _command_offset: Simplify dynamic loading of completions we don't have yet. 2011-11-14 22:12:15 +02:00
Ville Skyttä
3b8ef29ef3 Cleanups: Use [[ instead of [. 2011-11-09 23:28:11 +02:00
Ville Skyttä
1d48f79b9c Cleanups: use usual globs instead of substring matches or substitutions. 2011-11-09 22:46:21 +02:00
Ville Skyttä
22dff29dc4 _npus: Split out of lrzip for general use. 2011-11-09 18:35:13 +02:00
Ville Skyttä
3f851722d7 _services: Split xinetd service completion into _xinetd_services.
Only Mandriva's service operates on xinetd services, chkconfig does it
everywhere.
2011-11-09 18:14:23 +02:00
Igor Murzov
e4cdcca08e Merge completions/service into the bash_completion script.
If completion for a basename foo is already installed, the default
completion loader no longer fires for /etc/init.d/foo -- the basename
completion is invoked directly instead. This means that we need to load
completions for /etc/init.d and friends eagerly at bash_completion load :(
2011-11-09 05:21:53 +03:00
Igor Murzov
fbbd476df0 Add and use _sysvdirs() function that sets correct SysV init directory.
This function allows distros to fine tune their init directory location,
as simple checking for directories presence is not always sufficient.
2011-11-09 05:09:37 +03:00
Igor Murzov
fff412b2f2 Revert "Another stab at making service completion work on Slackware."
This reverts commit 1a01e54d856fe2d9496cfaf6d9df8b75d87a9b52.
See http://thread.gmane.org/gmane.comp.shells.bash.completion.scm/2278
2011-11-09 04:49:37 +03:00
Ville Skyttä
88b897e224 _cd: Don't try to complete variables (and fail), _init_completion already does. 2011-11-06 23:48:59 +02:00
Ville Skyttä
1a01e54d85 Another stab at making service completion work on Slackware. 2011-11-06 14:22:39 +02:00
Ville Skyttä
a9873c8727 Revert "service, _services: Make these work on Slackware GNU/Linux."
This reverts commit 9717124ab7bad30b6d8ba02ef91850c6bb74dd63.
See http://thread.gmane.org/gmane.comp.shells.bash.completion.scm/2278
2011-11-06 14:00:04 +02:00
Igor Murzov
9717124ab7 service, _services: Make these work on Slackware GNU/Linux. 2011-11-05 20:44:17 +03:00
Igor Murzov
bc2d3c9a34 _known_hosts_real: Replace "${HOME}" with "~" to make code more compact. 2011-11-05 19:51:07 +03:00
Igor Murzov
74d80d17f9 _known_hosts_real: Add some quotes (Alioth #313158)
Should fix errors if $HOME contains spaces.
2011-11-05 19:41:34 +03:00
Ville Skyttä
370a550baf _mac_addresses: Grab addresses from FreeBSD's ifconfig -a output too. 2011-11-05 12:09:40 +02:00
Ville Skyttä
bfa8425a4a _known_hosts_real: Don't offer hostnames containing wildcards. 2011-11-05 00:59:13 +02:00
Ville Skyttä
333a5a50be _known_hosts_real: Handle more than two hostnames per known hosts line (Debian: #647352). 2011-11-05 00:53:39 +02:00
Ville Skyttä
b54d3f022f _known_hosts_real: Discard @markers at beginning of line. 2011-11-05 00:38:37 +02:00
Ville Skyttä
0b4f797700 Unset _blacklist_glob when it's no longer needed. 2011-11-04 21:32:28 +02:00
David Paleino
84e9e14dd8 Change version to 1.90 2011-11-03 12:21:58 +01:00
Ville Skyttä
0d10b94e7a Move Emacs indentation settings from every file to .dir-locals.el. 2011-11-01 22:14:45 +02:00
Ville Skyttä
8890abfdfb unzip, jar: Complete on *.sar (JBoss service archive). 2011-11-01 19:18:54 +02:00
Ville Skyttä
099b47c66d kill, killall: Add some option and argument completions, simplify _signals. 2011-10-26 21:01:18 +03:00
Ville Skyttä
79ac9b5921 _command_offset: Fall back to _minimal instead of _filedir for oddball cases. 2011-10-26 20:46:00 +03:00
Ville Skyttä
22f88858ee _command_offset: Load undefined completions on demand. 2011-10-26 20:44:22 +03:00
Ville Skyttä
802a72fd8f _command_offset: Drop unused variables, define some others only when needed. 2011-10-26 19:56:22 +03:00
Ville Skyttä
3b029892f6 _init_completion: Improve variable name completion.
Complete only things that look like variable names to make things like
$HOME/<TAB> and $(<TAB> pass through, and fix completion of variables
enclosed in braces.
2011-10-25 20:15:13 +03:00
Igor Murzov
1bdf31c894 Don't use full path in the _completion_loader() function. 2011-10-24 20:40:45 +03:00
Ville Skyttä
8fe4a73f9a _completion_loader: Use _minimal instead of _longopt as fallback.
_longopt may end up invoking the completed command with --help which
may not be safe for all arbitrary commands out there.
2011-10-23 11:32:13 +03:00
Ville Skyttä
f6cd9344fb _completion_loader: Use _longopt as the fallback. 2011-10-23 11:09:48 +03:00
Ville Skyttä
ff8e52c960 _init_completion: Complete variable names. 2011-10-23 11:02:46 +03:00
Ville Skyttä
5afc526850 Make _userland easier to use. 2011-10-16 10:56:44 +03:00
Ville Skyttä
e179afe3c3 Fall back to generic completion for commands we don't have anything for. 2011-10-15 10:20:46 +03:00
Ville Skyttä
449c71fa74 Get rid of remaining $UNAME and $USERLAND uses.
Use $OSTYPE and _userland() instead.
2011-10-13 21:37:34 +03:00
Ville Skyttä
5baebf81d3 Add _xfunc for loading and calling functions on demand, use it in apt-get, cvsps, rsync, and sshfs. 2011-10-13 21:15:05 +03:00
Ville Skyttä
daa4aba4c8 Fix loading completions when bash_completion was sourced without a path. 2011-10-13 21:08:43 +03:00
Ville Skyttä
86ca9ee598 Replace $UNAME with $OSTYPE in trivial cases.
$OSTYPE is automatically available at runtime (for dynamic loading).
2011-10-12 23:07:21 +03:00
Ville Skyttä
20c05b43b6 Load completions in separate files dynamically, get rid of have(). 2011-10-12 00:19:50 +03:00
Igor Murzov
5051b1787a _command_offset: Restore compopts used by called command.
This fixes completions that rely on their compopts, most notably mount(8).
Fixes bash-completion bug #313183.
2011-09-30 22:21:47 +04:00
Ville Skyttä
89b7923cb8 ping, tracepath: Split to iputils, add option completions. 2011-09-28 18:59:15 +03:00
Ville Skyttä
9d146b9ba5 _known_hosts: Signal end of options to _known_hosts_real.
Fixes for example "ping --<TAB>":
error: _known_hosts_real: missing mandatory argument CWORD
2011-09-28 08:34:54 +03:00