[Bash-completion-devel] .netrc support for ftp, lftp, sitecopy, [curl, fetchmail, ... wget]

gibboris at gmail.com gibboris at gmail.com
Fri Nov 20 14:13:19 UTC 2009


Hi,
all those precited commands use the .netrc file if it exists.
I would like to have some support for it.
Kind of :

[[ -r $HOME/.netrc ]] && \
   netrc_hosts=( $(compgen -W "$(sed -n 's/.*[[:blank:] ]*machine \([^ [:blank:]]*\).*/\1/p' $HOME/.netrc)" -- "${cur:-1}") ) && \
   COMPREPLY=( "${COMPREPLY[@]}" ${netrc_hosts[@]} )

Should this go into _known_hosts_real ? _known_host_netrc ? ${1} or
only been appended between ~/.lftp/bookmarks and _known_hosts_real in lftp ${cur} ?

Note, there is not (yet?) completion for curl,fetchmail,msmtp and my patch for the wget completion
was misleading about the use of this file (I'll correct that).
So it's only really missing for ftp,lftp and sitecopy completions.

Raph



More information about the Bash-completion-devel mailing list