In fact I wrote this to specifically expand command line options, since bash did not expand the tilde in the filename I gave through the command line. Here is the output I got.
$ wget --post-file=~/vimrc www.example.com > --2013-03-15 00:31:54-- http://www.example.com/ > POST data file ‘~/vimrc’ missing: No such file or directory > In case you say, that the shell should have handled this, I guess it's an issue with bash, and I must work upstream to resolve it. On Fri, Mar 15, 2013 at 12:30 AM, Hrvoje Niksic <hnik...@xemacs.org> wrote: > Darshit Shah <dar...@gmail.com> writes: > > > When wget is passed a filename as a commandline parameter, tilde > expansion > > is not carried out on it, though the function cmd_file clearly states > that > > this should happen. > > Tilde expansion happens in the parser before cmd_file is invoked, > similar to how the shells do it. See the function > setval_internal_tilde. > > It would be wrong to do the expansion in cmd_file because then it would > be expanded even for command-line options, where its the shell's job to > do that. In fact, that would prevent you from accessing a directory > named "~" using Wget's command line. > -- Thanking You, Darshit Shah Research Lead, Code Innovation Kill Code Phobia. B.E.(Hons.) Mechanical Engineering, '14. BITS-Pilani