when downloading a file, an absolute file path is not supported #75
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#75
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When saving a file, entering the command to save to a specific location will usually not work, as paths are always built relative to the download path.
For example, saving a file using the command
w . ~/test
will not work, as Bombadillo tries to write to downloadpath/~/test.I think this should wait for #73 to avoid merge conflicts.
This was by design. It seemed a simple model that mostly follows how people's web browsers are currently configured (though most browsers do also let you set it somewhere).
I am definitely up for allowing explicit save locations. Do we add another command?
WRITETO
/WT
, or the like? Or do we try to tell if the argument being passed is a path vs a filename? Do we let people add on to the default path? If so, how do we differentiate that from a user just entering a path? Will we accept relative paths?If we get to the bottom of those questions I think we will land in a good place and be able to code it up. I agree waiting until after #73 is a good idea.
#73 has been merged in. Saving a file will no longer overwrite an existing file, instead adding a number to the end of the filename iteratively.
For this issue I think some decisions need to be made:
I think this is an area where less functionality is better.
I would suggest going further, and remove the ability to specify a file name.
The majority of use cases could still be satisfied by simplified functionality. The client reports where a file has been downloaded, so the user can do what they like with it after that.
Does allowing a file name add much value? Yes, to some extent, but nothing that can't be done from the shell.
Furthermore, I would suggest that if we allow specifying a file name the convention seems to be that paths should also be supported. Looking at how other applications work:
:w a
and:w /path/file
and:w ~/file
with tab completionWith all of that said, I would also be OK with allowing a file name to be specified but not allowing paths. It is the simpler approach.
I can definitely see your point. It is a very simple update to remove the ability to do a
save as...
. I agree that since the path is shown to the user after the save (plus it is deterministic, since they set their save path) that it really isnt a needed feature.Removing it will have the added benefit of cleaning up the manpage a little (it feels like a lot of
:write
commands all in a row).I'll work on this tomorrow night and open a PR, unless you had already started?
Glad we are agreed.
I had not yet started on this as I wanted to get your feedback first. If you feel like handling it then please go ahead!
Fixed in #82. Thank you @sloum!