Ville Skyttä
955219bf69
Use _init_completion() in bash_completion.
2011-04-20 13:14:04 +03:00
Ville Skyttä
32dbe76784
Add _init_completion() for common completion initialization and generic redirection handling.
2011-04-20 13:11:09 +03:00
Ville Skyttä
6fbd0cc50e
Install xzdec completion even if xz or pxz are not available.
2011-04-19 23:37:54 +03:00
Ville Skyttä
a47aff8481
Fix local variable leaks from bluez completions.
2011-04-17 13:44:06 +03:00
Ville Skyttä
f1b4f1b982
Parse help only when needed.
2011-04-16 20:42:43 +03:00
Ville Skyttä
00bcf408a3
Remove stale comment.
2011-04-16 16:19:44 +03:00
Ted Pavlic
2eb713ff76
Add *.dbj to (la)tex filename completions (RedHat: #678122 ).
2011-04-15 23:47:22 +03:00
Ville Skyttä
1ffb918b4e
Support tildes when recursively sourcing muttrc files (Debian: #615134 ).
2011-04-14 22:17:29 +03:00
Ville Skyttä
f0a9128649
Don't install completions for init.d backup files.
2011-04-12 23:48:14 +03:00
David Paleino
4ad538ba1a
Fix __get_cword_at_cursor_by_ref: check for $index when completing with a cword+1 argument already present (Debian: #622383 )
2011-04-12 22:06:12 +02:00
Ville Skyttä
7c34b56267
Try both full path and basename completions for sudo etc (Alioth: #313065 ).
2011-04-12 20:28:08 +03:00
Ville Skyttä
770bcdf71d
Install full path /etc/rc.d/init.d/* completions.
2011-04-12 20:13:30 +03:00
Ville Skyttä
c42aa0b424
Install only full path (no basename) completions for /etc/init.d/*.
2011-04-12 20:12:32 +03:00
David Paleino
dcf09d3c98
Also filed on LP
2011-04-12 12:54:04 +02:00
Scott Bronson
f1b9580b35
Override MANPAGER when generating perldoc completions (RedHat: #689180 ).
2011-04-09 12:15:40 +03:00
Ville Skyttä
ee43b22f9b
Use += to append to arrays and strings.
...
It's easier on the eye and faster than foo=( "${foo[@]}" ... ).
2011-04-06 20:39:21 +03:00
Ville Skyttä
e31f021470
Replace some uname -s checks with $OSTYPE ones.
2011-04-06 20:28:19 +03:00
Ville Skyttä
f0eac44ac9
(testsuite) Test java -classpath in addition to -cp.
2011-04-06 18:51:22 +03:00
Ville Skyttä
c691c6e998
Add CHANGES entry and test case for previous java completion change.
2011-04-06 18:49:06 +03:00
Mattias Ulbrich
823f634551
repaired sourcepath and classpath lookup
...
did not work correctly if multiple paths were given (using :)
now takes the corrected information
2011-04-06 18:46:28 +03:00
Ville Skyttä
d2707cf368
Try /usr/sbin before /sbin in have().
...
The former tends to have more executables so this should save some
stat() calls in some setups.
2011-04-05 22:44:04 +03:00
Ville Skyttä
4e4e300ef1
Add code style settings block.
2011-04-05 22:43:29 +03:00
Ville Skyttä
9af6f3504e
Abort completion file loading earlier if required commands are not available.
...
Cuts ~10% from bash completion load time on two different systems I
just tested.
2011-04-05 00:37:55 +03:00
Ville Skyttä
a7c3da6322
Take advantage of short-circuit eval of [[ ]].
2011-04-04 23:57:07 +03:00
Ville Skyttä
0c08c5a009
Drop unnecessary $USERLAND check.
2011-04-04 23:52:56 +03:00
Ville Skyttä
94c51fc36e
Coding style consistency tweaks.
2011-04-04 23:48:22 +03:00
Ville Skyttä
f7c93600a6
Avoid some have() calls.
...
Single file existence etc checks are cheaper than full $PATH lookups.
2011-04-04 22:12:40 +03:00
Ville Skyttä
c65949385a
Drop unnecessary subshell.
2011-04-04 22:09:30 +03:00
Ville Skyttä
4d3e9d092c
Add $_backup_glob for matching various backup files and reuse it.
...
Compared to the previous embedded/duplicated globs, this one
additionally treats *.orig and *.rej as backup files.
2011-04-01 20:22:10 +03:00
Ville Skyttä
ec25abac89
(testsuite) Make ri basic test case more likely to work.
...
Plain "ri " completion returns 3729 entries on my box which is way
more than fits into the expect buffer we have in effect.
2011-04-01 20:09:42 +03:00
Matej Cepl
e10848b7e5
Complete oo{writer,impress,calc,draw} on LibreOffice FlatXML extensions (RedHat: #692548 ).
2011-03-31 22:46:58 +03:00
Ville Skyttä
61b91cb41b
Trivial code cleanup.
2011-03-29 23:29:51 +03:00
Ville Skyttä
c398b1c56f
(testsuite) Fix get_hosts option docs.
2011-03-29 23:27:51 +03:00
Freddy Vulto
68e9a8e6eb
(testsuite) Add -unsorted option to _get_hosts()
...
_known_hosts_real tests were failing after commit 81794a9:
FAIL: Hosts should be put in COMPREPLY
FAIL: Hosts should have username prefix and colon suffix
This is because tcl's get_hosts() is now doing a unique sort, but bash
_known_hosts_real() IS returning duplicates relying on bash's compgen/complete
to remove the duplicates). Fixed by calling _get_hosts -unsorted.
2011-03-27 23:12:14 +02:00
Freddy Vulto
7cd17ada11
Fix __reassemble_comp_words_by_ref() unquoted pattern removal
...
Commit 8227e76 was failing on these `chown' tests in bash-4.1:
FAIL: Check preserve special chars in funky\ user:Debia<TAB>
FAIL: Check preserve special chars in funky\.user:Debia<TAB>
FAIL: Check preserve special chars in fu\ nky.user:Debia<TAB>
FAIL: Check preserve special chars in f\ o\ o\.\bar:Debia<TAB>
FAIL: Check preserve special chars in foo\_b\ a\.r\ :Debia<TAB>
because a removal pattern is expanded:
$ a=\\b
$ w=\\
$ echo ${a#$w} # Doesn't work
\b
$ echo ${a#"$w"} # Ok
b
2011-03-27 22:08:55 +02:00
David Paleino
8c3a0e94d1
Make $cur local
2011-03-27 13:58:59 +02:00
David Paleino
42b107bcfc
Fix broken _allowed_groups usage (shadow and coreutils)
2011-03-27 12:40:44 +02:00
Ville Skyttä
a73774c833
Fix regressions and further tweak previous java completion patch.
...
Fix inner class regression, adapt test suite, turn off nospace for
single class completions, protect -o nospace for bash < 4.
2011-03-24 20:45:16 +02:00
Mattias Ulbrich
920b1f93b6
improved java completion
...
now suggests also package names
2011-03-24 20:44:10 +02:00
Freddy Vulto
8227e76e09
Improve __reassemble_comp_words_by_ref() (Alioth #313057 )
...
Prohibit word creation of characters if they're excluded from
$COMP_WORDBREAKS. For example, with ':' included in $COMP_WORDBREAKS,
'a b:' should split to 'b' and ':'. With ':' excluded from
$COMP_WORDBREAKS, 'a b:' should split to 'b:', NOT 'b' and ':'.
2011-03-24 00:00:58 +01:00
Ville Skyttä
2c78ae3ea1
(testsuite) Add basic xzdec test case.
2011-03-21 19:46:13 +02:00
Ville Skyttä
70a3b8a8b4
xz* option completion updates.
2011-03-21 19:45:08 +02:00
Ville Skyttä
03fee4b4d3
Apply xz completion to pxz too.
2011-03-21 19:44:17 +02:00
Ville Skyttä
8aed79dd3e
Avoid some unnecessary command invocations.
2011-03-21 19:23:57 +02:00
Ville Skyttä
f973eb043c
More tar *[cr]*f completion improvements.
2011-03-20 18:43:12 +02:00
Ville Skyttä
0ae464e580
Improve tar *[cr]*f completions (Debian: #618734 ).
2011-03-20 18:22:21 +02:00
Ville Skyttä
4f4c7f2d1f
Add bunch of tar option completions.
2011-03-20 18:05:54 +02:00
Ville Skyttä
87227ceccd
Don't lose J if present in original tar command when finding out how to untar.
2011-03-20 17:21:02 +02:00
Ville Skyttä
91c13f0eed
Fix completion of files inside *.tar.bz2 archives when [Ijy] is not given.
2011-03-20 17:12:52 +02:00
David Paleino
14fc9f2965
If _filedir 'ext' returns nothing, just fallback to generic file completion. Patch by Clint Byrum (Debian: #619014 , LP: #533985 )
2011-03-20 15:22:33 +01:00