lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.08k stars 159 forks source link

[feature] Shell completion #677

Closed Freed-Wu closed 1 year ago

Freed-Wu commented 1 year ago

How about adding shell completions for bash/zsh/fish/posh/etc? Thanks!

❯ lftp -<TAB>
option
-c          execute the commands and exit
-d          switch on debugging mode
-e          execute the command just after selecting
-f          execute commands from the file and exit
--help      print this help and exit
--norc      don't execute rc files from the home directory
-p          use the port for connection
-s          assign the connection to this slot
-u          use the user/password for authentication
--version   print lftp version and exit

PS: lftp has a zsh completion, but it has bug which cannot complete any options. https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_ncftp#L1