This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 4/5] Implement "set cwd" command on GDB


On Friday, September 22 2017, Pedro Alves wrote:

> On 09/22/2017 09:02 AM, Eli Zaretskii wrote:
>>> From: Sergio Durigan Junior <sergiodj@redhat.com>
>
>> 
>>> +@kindex set cwd
>>> +@cindex change inferior's working directory
>>> +@item set cwd @r{[}@var{directory}@r{]}
>>> +Set the inferior's working directory to @var{directory}.  If not
>>> +given, @var{directory} uses @file{'~'}.
>> 
>> I think we should document here what does "~" mean on MS-Windows,
>> especially since, when HOME is not in the environment, Gnulib's glob
>> module doesn't behave according to MS platform recommendations (which
>> say not to create files directly below %HOMEDRIVE%%HOMEPATH%).
>> 
>> More generally, I think we should say here that the argument is
>> glob-expanded, because this is user-visible behavior (right?).  Also,
>> how will TAB-completion react to input of this command? will it expand
>> the input typed so far?
>
> Actually, should the command default to ~ at all?  Shouldn't we
> make "set cwd" clear the setting to the default state, i.e.,
> empty?  Otherwise, how do you get back to the default state?

That's a good point.  "set cwd" currently mimics what "cd" does, and
that's the reason for this "default is to use ~" decision.

I can certainly make "set cwd" without arguments to clear out whatever
has been set by the user.  I think that's a more sensible decision
indeed.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]