-
-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DownloadPost autocommand #807
Comments
I'm definitely not opposed to this idea, the API doesn't provide a clear way to do this though. We do have the onChanged event though, maybe that fires when the download is finished? |
The example on the bottom of that pages seems to be how you would check if the download is completed. It looks like the data for the filename and url are available as well. |
You are correct. I didn't look at the delta object offered. This is definitely doable. |
The betas have a |
This addresses issues tridactyl#810 and tridactyl#807. An optional argument of the type AutocmdArgs can be passed to loadaucmds. Only a small subset of the variables mentioned in tridactyl#810 are implemented. I think it's better to implement these as the need/request arrives but for the DownloadPost aucmd I felt like this was the most straightforward way to implement. The parseaucmdargs function takes an aucmd and looks for the pattern "<param"> where param is any of the keys provided by AutocmdArgs and replaces the pattern with the matching information from the args. Example usage: `:au DownloadPost .* fillcmdline "<file>"` Will print the full path of the downloaded file on the cmdline.
This addresses issues tridactyl#810 and tridactyl#807. An optional argument of the type AutocmdArgs can be passed to loadaucmds. Only a small subset of the variables mentioned in tridactyl#810 are implemented. I think it's better to implement these as the need/request arrives but for the DownloadPost aucmd I felt like this was the most straightforward way to implement. The parseaucmdargs function takes an aucmd and looks for the pattern "<param"> where param is any of the keys provided by AutocmdArgs and replaces the pattern with the matching information from the args. Example usage: `:au DownloadPost .* fillcmdline "<file>"` Will print the full path of the downloaded file on the cmdline.
Pentadactyl has an event for after something has been downloaded. This particularly useful to pass the file location to a shell script and then open a vim-like file manager (e.g. ranger) to choose a new location for the file.
The text was updated successfully, but these errors were encountered: