feat: Make SFTP `put` command handle wildcards
Update the sftp put function to resolve wildcards (like *), and upload all matched files to the container.
For now, I left the logic of not replacing the file in the container if it already exists.
For handling multiple files, I used the logic as described in the OpenSSH documentation.
local-path may contain glob(7) characters and may match multiple files. If it does and remote-path is specified, then remote-path must specify a directory.
@kzys Yep that makes way more sense actually, as that would also enable devs to write scripts for uploading files programmatically. It'd also satisfy my use-case fully.
Just a question: I checked how fly sftp get works, and it operates on a single file as well. I'm not sure how we can let the shell expand the provided glob before passing it into fly, but I am not well-versed with Unix shell stuff to be honest.
Also, if we decide to go this route, it'd be cool to have a flag like --overwrite that overwrites any existing files in the container. WDYT?
I came here because I would looove fly sftp put 😍 @kzys
Stumbled across this thread because fly sftp shell doesn't allow completions, or the star syntax, which taken together make using it a schlep -- adding put would probably solve