20 Commits

Author SHA1 Message Date
Ville Skyttä
217e143fd6 ssh: Add -O argument completion (Debian: #680652). 2012-07-07 22:54:11 +03:00
Itaï BEN YAACOV
89acac9910 scp: Recognise symlinks to directories as directories (Debian: #666055).
When auto-completing an scp command, slashes are added after (local
or remote) directories, and spaces after files AND after symlinks to
directories.  Expected behaviour would be slashes after directories
or symlinks to such.
2012-06-15 19:17:55 +03: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ä
0d10b94e7a Move Emacs indentation settings from every file to .dir-locals.el. 2011-11-01 22:14:45 +02:00
Ville Skyttä
156656c16d Split/rename many completions into per-command files. 2011-10-12 23:01:10 +03:00
Ville Skyttä
20c05b43b6 Load completions in separate files dynamically, get rid of have(). 2011-10-12 00:19:50 +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
Ville Skyttä
68f7fa16b0 ssh, scp, sftp, ssh-copy-id: Use _parse_help/_parse_usage, add some option argument (non)completions. 2011-05-12 00:24:57 +03:00
Ville Skyttä
1b85a1bf58 Treat arguments starting with . or ~ as paths where that check is done. 2011-04-24 19:35:42 +03:00
Ville Skyttä
aa411dd30b Drop no longer needed "type compopt" checks. 2011-04-21 12:35:24 +03:00
Ville Skyttä
9f45e81e65 Drop no longer needed _compopt_o_filenames().
Use compopt -o filenames directly instead.
2011-04-21 12:33:05 +03:00
Ville Skyttä
8048917968 Use _init_completion() in completions/[q-z]*. 2011-04-21 11:15:01 +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ä
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ä
94c51fc36e Coding style consistency tweaks. 2011-04-04 23:48:22 +03:00
Ville Skyttä
15bc11769b Improve scp path escape regex.
The previous one reportedly ended up escaping 't' to '\t' in some
setups (at least bash 3.2.48 on OS X 10.6, but not with 4.1.7 on
Fedora nor 3.2.25 on CentOS), probably due to missing backslash in the
regex.  This one removes some spurious escaping and duplicates in the
char class, and should communicate the intent better.
2010-12-23 22:05:55 +02:00
Ville Skyttä
0f450219b6 Remove most "-o filenames" options to "complete".
Turn it on dynamically when needed instead; see doc/styleguide.txt for
a longer explanation.  This fixes many non-filename completions which
had been previously more or less broken due to unwanted
escape-as-filenames behavior.
2010-11-01 19:29:45 +02:00
Ville Skyttä
3d8efed618 Fixes to completions for filenames containing tabs (RedHat: #629518). 2010-10-04 20:49:17 +03:00
Guillaume Rousse
cb7fc2f7c4 rename 'contrib' directory to 'completions' 2010-09-12 16:42:21 +02:00