guns
6f3d650e23
Workaround bash bug that fails to complete <, >
...
There is a bug in bash that causes completions of some of the
redirection operators to fail if a default completion function is
defined.
The details are in the following bug-bash mailing list message, but put
simply, when completing a command line "> ", bash mistakenly searches
the completions table for an empty string, and failing that, sends
the default completion function not an empty string, but the actual
redirection operator '>' as the first argument.
http://lists.gnu.org/archive/html/bug-bash/2012-01/msg00045.html
This is quite simply worked around for the moment by defining the
_minimal completion for the empty string. This allows filename
completion for people who like to:
$ > cats.txt # Truncate files quickly
$ >> cats.txt # Use redirection as a quick 'touch'
$ < cats.txt cat # Use redirection at the beginning of the
# command line
Given the slow bash upgrade cycle for various operating systems, a
workaround for this issue will be necessary for a long time.
2012-01-18 23:35:54 +02:00
Igor Murzov
db53fc77a5
_modules: Ignore error messages.
2012-01-13 00:17:51 +04:00
David Paleino
2ad325d4af
Revert "Fix completion loading when a symlink is sourced, thanks to Jonathan Nieder"
...
This reverts commit 318759c8497cfce3704bc1b97c41459a5be08f7b.
2012-01-11 21:48:35 +01:00
David Paleino
318759c849
Fix completion loading when a symlink is sourced, thanks to Jonathan Nieder
2012-01-11 14:37:15 +01:00
Igor Murzov
2e975278c5
_command_offset: Properly quote arguments of eval (Alioth: #313499 ).
2012-01-10 03:50:00 +04:00
Igor Murzov
b515b0dd38
Merge remote-tracking branch 'origin/sudo'
...
* origin/sudo:
sudoedit: New completion.
sudo: Fix option list parsing
sudo: Handle options (Alioth: #311414 ).
2012-01-09 16:25:00 +04:00
David Paleino
5eaf276b5f
Release 1.99 -- hopefully the last 2.0 preview
2012-01-08 00:17:28 +01:00
Ville Skyttä
fabf0e2d35
Some trivial nounset error fixes.
2012-01-01 14:46:59 +02:00
Ville Skyttä
d4416acccc
_filedir, _tilde: Ignore compopt stderr for direct invocations in unit tests.
2012-01-01 14:42:39 +02:00
Ville Skyttä
5fcaad8756
cleanups: Drop some no longer needed stderr redirections.
2011-12-26 21:47:51 +02:00
Ville Skyttä
9ba0476b9e
Fix BASH_COMPLETION_COMPAT_DIR comment.
2011-12-26 16:09:00 +02:00
Igor Murzov
91a61afe59
sudo: Handle options (Alioth: #311414 ).
2011-12-20 19:56:37 +04:00
Florian Hubold
bb5200695b
xv: Add *.eps and *.ps to filename completions (Alioth: #313477 ).
2011-12-17 11:19:40 +02:00
Ville Skyttä
a229ea46e7
_parse_help, _parse_usage: More command arg sanitization.
...
http://thread.gmane.org/gmane.comp.shells.bash.completion.devel/3620
2011-12-14 21:54:49 +02:00
Ville Skyttä
260e2a1eeb
quote: Preserve leading, trailing, and consecutive whitespace.
2011-12-12 00:22:09 +02:00
Raphaël Droz
723b0771ad
_ip_addresses: Make it locale agnostic.
2011-12-11 22:26:52 +02:00
Ville Skyttä
17c9722733
_known_hosts_real: Support > 1 files per *KnownHostsFile line (Debian: #650514 ).
2011-12-05 21:58:04 +02:00
Igor Murzov
98fe4713a3
_modules: Follow symlinks in /lib/modules/$(uname -r) (Alioth: #313461 )
2011-12-04 17:31:41 +04:00
Ville Skyttä
5b455e0171
_known_hosts_real: Include hosts reported by ruptime (Alioth: #313308 ).
2011-12-03 20:01:11 +02:00
Ville Skyttä
ba24f209ca
_variables: New function split from _init_completion.
2011-11-26 22:01:09 +02:00
Ville Skyttä
bb02bcde80
dequote: Use printf instead of echo (Alioth: #312163 ).
2011-11-26 16:09:36 +02:00
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