These would be useful to set. Particularly for me filename/title, as it affects what others see.
I have been looking into adding these, but not sure of the best way to parse the args.
Due to the nature of allowing spaces in file paths, we can't just split the args on spaces so was wondering of a unix style /slack upload <file_path> title=xxx initial_comment=xxx
@trygveaa any thoughts? I am interested in implementing this for my own use but would like to create a more general solution to contribute upstream.
@guyfedwards: I think the most fitting would be to use hyphen-options (-filename <filename>) with quotes around the argument if it contains spaces. Multiple commands use hyphen-options to provide optional arguments, e.g. /print -buffer <some_buffer> text. Not many commands accepts quotes, because most commands don't have arguments which can contain spaces, but /trigger uses quotes for it's arguments, so it fits with that.
So the command could be:
/slack upload [-filename "<filename>"] [-title "<title>"] [-comment "<comment>"] <path>
Is it possible to make the upload work with the clipboard? The use case is to upload an image copied to the clipboard
Most helpful comment
@guyfedwards: I think the most fitting would be to use hyphen-options (
-filename <filename>) with quotes around the argument if it contains spaces. Multiple commands use hyphen-options to provide optional arguments, e.g./print -buffer <some_buffer> text. Not many commands accepts quotes, because most commands don't have arguments which can contain spaces, but/triggeruses quotes for it's arguments, so it fits with that.So the command could be: