1532 Commits

Author SHA1 Message Date
Igor Murzov
b13ee019d0 make completions that use _command also work with file names 2011-06-26 04:04:53 +04:00
Ville Skyttä
472b5bb958 _services: Include systemd services. 2011-06-18 23:26:19 +03:00
Ville Skyttä
50d44ca3a4 _services: Avoid bogus completions when init or xinetd dirs exist but are empty. 2011-06-18 23:01:00 +03:00
Ville Skyttä
a52c4ea382 __parse_options: Remove trailing [().]* from completions. 2011-06-18 15:44:43 +03:00
David Paleino
2a05603ecd Implemented a blacklist for unwanted third-parties completions 2011-06-14 21:31:02 +02:00
Ville Skyttä
5681ec1ac9 evince: Split into separate file, add option completions. 2011-06-09 00:33:57 +03:00
Igor Murzov
c28c06baef Rewrite 'pdf|fdf' as '[pf]df' in evince and okular glob patterns. 2011-06-08 04:24:07 +04:00
Ville Skyttä
166b4bbb50 Simplify epdfview glob pattern. 2011-06-07 20:22:25 +03:00
David Paleino
4485e909af Add epdfview completion 2011-06-07 08:48:18 +02:00
Ville Skyttä
d0c4f5ddd2 _shells: Rewrite in plain bash instead of using grep. 2011-06-04 19:58:52 +03:00
Ville Skyttä
d74e169935 Get rid of bash_completion self-parsing from _filedir_xspec (RedHat: #479936).
My tests show a ~5% (cached) load time improvement with this, it'll
make _filedir_xspec somewhat faster too, and it's generally less ugly.
I suppose we'll rewrite this stuff again in the near future when we
start to take advantage of dynamic completion loading, but until then
I'll take the small improvement.
2011-06-04 10:52:51 +03:00
Ville Skyttä
8f3777e278 Rename _ssh_bindaddress to global _ip_addresses for reuse in other completions. 2011-06-02 10:51:42 +03:00
Freddy Vulto
6e7359f69c Improve _get_comp_words_by_ref()
Empty $cur with cmd = " | a " (| = cursor position)
(Alioth #313102)
2011-05-20 00:27:08 +02:00
Freddy Vulto
2f37a38b79 Improve _get_comp_words_by_ref()
Empty $cur when cmd = "|a " (| = cursor position)
2011-05-19 22:47:00 +02:00
Freddy Vulto
fc96a951b7 Fix error "bad array subscript"
Caused by _get_comp_words_by_ref() with cursor at position 0.
Patch by Igor Murzov (Debian: #559953)
2011-05-19 22:40:14 +02:00
Ville Skyttä
0bc2bb5897 Clean up unneeded semicolons. 2011-05-11 19:42:02 +03:00
Ville Skyttä
b8b46f9c27 _parse_help: Pick long options also from "-f FOO, --foo=FOO". 2011-05-11 19:28:17 +03:00
Ville Skyttä
a4fa9bb3eb Fix FSF address in copyright notice. 2011-05-11 00:30:13 +03:00
Ville Skyttä
622d2bd25f _longopt: Use \{0,1\} instead of \? for sed (basic regex) portability. 2011-05-08 15:30:37 +03:00
Ville Skyttä
727fa3adfd modplug*: Add more extensions for files supported by libmodplug. 2011-05-08 15:17:52 +03:00
Ville Skyttä
3334711726 _parse_usage: Deal with whitespace in brackets. 2011-05-05 00:06:58 +03:00
Ville Skyttä
cec611fa51 _parse_help: Use -r to "read" to avoid backslash issues. 2011-05-04 22:45:47 +03:00
Ville Skyttä
1c76e608fd __parse_options: Return 0 to avoid false negatives from _parse_* test cases. 2011-05-03 09:35:53 +03:00
David Paleino
4632248cbb Get rid of $BASH_COMPLETION as well 2011-05-02 19:04:24 +02:00
David Paleino
43728af423 Get rid of BASH_COMPLETION_DIR and BASH_COMPLETION_HELPERS_DIR 2011-05-02 18:37:49 +02:00
David Paleino
5961c3b8cd Layout change: everything is now in /usr/share/bash-completion/, rather than in /etc/. 2011-05-02 17:01:23 +02:00
Ville Skyttä
dd59b49f25 _init_completion: Doc update. 2011-05-02 14:37:33 +03:00
Ville Skyttä
457dbf6061 _init_completion: Indicate that completion should not continue if cword == 0.
http://thread.gmane.org/gmane.comp.shells.bash.bugs/16499
http://lists.alioth.debian.org/pipermail/bash-completion-devel/2011-May/003635.html

Thanks-to: Igor Murzov <igor@gplsoft.org>
2011-05-02 14:37:33 +03:00
Ville Skyttä
68f6f1c685 _parse_usage, _parse_help: Add _parse_usage, expand [no-] and [dont-?] as well in _parse_help. 2011-05-02 14:37:13 +03:00
Ville Skyttä
c875723bef Include trailing equals sign in options that take arguments that way.
This way it's clearer to users that an argument is expected.  It's
likely that this commit does not catch all such cases, but it should
do it for most of the affected commands I have installed.
2011-05-02 11:45:55 +03:00
Ville Skyttä
288c1eb3c1 _parse_help: Fix handling of commands with paths.
Regression from commit a614028a9b7e22b76f609a49dc7cfc2b8ad0abcd, need to
eval cmd before setting IFS to avoid it being split.
2011-05-02 10:40:36 +03:00
Ville Skyttä
a54857cd05 _init_completion: Add -s for splitting long options, use it in completions. 2011-05-02 00:04:26 +03:00
Igor Murzov
5c98d3160a _init_completion: Fix out of bounds access to words when cword is 0. 2011-05-01 17:32:09 +03:00
Ville Skyttä
ddbd28f638 Comment fixes. 2011-05-01 17:29:43 +03:00
Ville Skyttä
a614028a9b _parse_help: Implement in bash instead of awk.
It's more portable and maintainable this way, but also somewhat slower
(but not slower enough that it'd actually matter).
2011-05-01 14:24:29 +03:00
Ville Skyttä
8b45b345ce _filedir*: Add link to bash-bug discussion about complete -X case sensitivity. 2011-05-01 12:39:13 +03:00
Ville Skyttä
2544b384ea Add lbzip2, lbunzip2, and lbzcat completions, using corresponding bzip2 ones. 2011-04-29 12:32:49 +03:00
Ville Skyttä
7fb4e3137d _parse_help: Don't treat tokens with more than two leading dashes as options. 2011-04-29 12:05:29 +03:00
Ville Skyttä
b6cdacf1f9 _parse_help: Expand --[no]foo to --foo and --nofoo. 2011-04-29 11:47:48 +03:00
Ville Skyttä
fd2bd342e0 _parse_help: Fix --foo={bar,quux} handling. 2011-04-28 20:48:48 +03:00
Ville Skyttä
9d810be86b _parse_help: Make work with pipe separated options. 2011-04-27 23:22:03 +03:00
Ville Skyttä
92ff96417d _parse_help: Fix handling of tildes and escaped chars in command. 2011-04-27 22:10:40 +03:00
Ville Skyttä
7b60fc6555 _parse_help: Re-fix --foo[=bar] handling. 2011-04-27 21:44:04 +03:00
Ville Skyttä
5cd5993211 _parse_help: Change to output first long option, or first short if not found.
Makes things more consistent with the rest of our option offerings.
2011-04-27 18:36:52 +03:00
Ville Skyttä
c5b771749b Add _terms() and screen -T completion. 2011-04-25 15:49:06 +03:00
Ville Skyttä
3750aea95e Remove stale comment. 2011-04-25 15:49:06 +03:00
Ville Skyttä
d4e177a6ab Simplify $UNAME checks. 2011-04-25 12:54:55 +03:00
Ville Skyttä
095b5a02d2 Fix --foo[=bar] parsing in _parse_help(). 2011-04-25 11:43:57 +03:00
Ville Skyttä
6e809d032c Remove = from COMP_WORDBREAKS when using _split_longopt().
Without this, it does not do anything useful in bash >= 4.0.
2011-04-25 00:09:50 +03:00
Ville Skyttä
a0afe0959b Try to figure out file/dir argument types from --foo=BAR in _longopt(). 2011-04-24 20:17:34 +03:00