"function --argument" is not a thing, it's "--argument-names". This only
accidentally works because our getopt is awful and allows abbreviated
long options.
Similarly, one argparse test used "--d" instead of "-d" or "--def".
for various completions.
This makes the code a bit nicer, removes one of the
__fish_print_hostnames calls (which are slow) and a sed call, thereby
improving performance by about 33% (600ms to 400ms).
Fixes#4511.
This commit addresses many of the style problems with the previous
commit. If this introduces any bugs they are solely my fault. The style
of this code needs more improvement. Some of which could be done today.
Others will have to wait until `fish_indent` is improved.
Add IPV6 /etc/hosts completion support. Parses columns rather than values which produces improved output.
Support ssh -F and Include completion
Ignore ssh Hostname and Host with wildcard. The following only get in the way:
- Hostname: Host resolves to Hostname
- Wildcard Host: Cannot ssh to a glob pattern
Improve scp completions
* complete only local files when no host provided
* complete only remote files when host is provided
* complete local files or hosts when no separator
Disable username completion for ssh/scp
Username completion only provides local users which will unlikely be
useful on a remote machine. ssh will use the current username (the only
useful one) or one provided in the ssh config.
I believe apm must have been buggy - example output that I found online
showed `tr` was mangling paths with spaces in it. Should be fixed.
Also, use dscl on OS X in __fish_complete_users.fish like
__fish_print_users.fish already does.