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
Ville Skyttä
2f90dc7ecf
Make _filedir's "fallback to everything" behavior optional, and off by default.
...
Configuration variable: COMP_FILEDIR_FALLBACK
http://thread.gmane.org/gmane.comp.shells.bash.completion.devel/3357
2011-09-19 19:42:52 +03:00
Ville Skyttä
bff8677599
gprof: New non-generic completion.
...
Neither _longopt, _parse_help, or _parse_usage do a very good job at
all parsing gprof's --help output.
2011-08-20 11:19:42 +03:00
Ville Skyttä
95ea13a0f0
_longopt: Don't offer completions after --help, --usage, or --version.
2011-07-22 00:10:36 +03:00
Ville Skyttä
7137e60a45
base64: New _longopt completion.
2011-07-21 23:59:41 +03:00
Ville Skyttä
fe4ae55f34
_longopt: Don't use -o default with it to make splitting work as intended.
2011-07-21 23:57:49 +03:00
David Paleino
d689342a75
Revert "Revert "host, nslookup: Remove completions for bind utils from bash_completion.""
...
This reverts commit 82325b37a91343c19ec4067fca00153bd635bfc8.
2011-07-18 13:21:23 +02:00
David Paleino
82325b37a9
Revert "host, nslookup: Remove completions for bind utils from bash_completion."
...
This reverts commit bd482ca2f221323aa461ca75c9457ec11f43570e.
2011-07-18 11:46:13 +02:00
Igor Murzov
bd482ca2f2
host, nslookup: Remove completions for bind utils from bash_completion.
...
This fixes tests on systems without bind.
2011-07-18 02:48:42 +04:00
Ville Skyttä
b68cc0057f
curl: New non-generic completion.
2011-07-12 00:07:35 +03:00
Ville Skyttä
102a19c8a2
_parse_help: Treat " or " as a separator when parsing options.
2011-07-10 15:25:23 +03:00
Ville Skyttä
e7b3abf689
sum: New (generic long option) completion (RedHat: #717341 ).
2011-06-29 00:24:46 +03:00
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