[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Tilde expansion not carried out in file_cmd
From: |
Darshit Shah |
Subject: |
Re: [Bug-wget] Tilde expansion not carried out in file_cmd |
Date: |
Fri, 15 Mar 2013 00:45:38 +0530 |
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 <address@hidden> wrote:
> Darshit Shah <address@hidden> 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
- [Bug-wget] Tilde expansion not carried out in file_cmd, Darshit Shah, 2013/03/14
- Re: [Bug-wget] Tilde expansion not carried out in file_cmd, Hrvoje Niksic, 2013/03/14
- Re: [Bug-wget] Tilde expansion not carried out in file_cmd,
Darshit Shah <=
- Re: [Bug-wget] Tilde expansion not carried out in file_cmd, Micah Cowan, 2013/03/14
- Re: [Bug-wget] Tilde expansion not carried out in file_cmd, Ángel González, 2013/03/14
- Re: [Bug-wget] Tilde expansion not carried out in file_cmd, Pavel Kačer, 2013/03/14
- Re: [Bug-wget] Tilde expansion not carried out in file_cmd, Micah Cowan, 2013/03/15
- Re: [Bug-wget] Tilde expansion not carried out in file_cmd, Pavel Kačer, 2013/03/15