* [PATCH] cd command defaults to ~
@ 2012-07-05 2:31 Nathaniel Flath
2012-07-05 14:00 ` Jan Kratochvil
0 siblings, 1 reply; 25+ messages in thread
From: Nathaniel Flath @ 2012-07-05 2:31 UTC (permalink / raw)
To: gdb-patches
Hi,
'cd' in bash defaults to ~, whereas in gdb will throw an error. This
patch has the 'cd' command in gdb use '~' as a default instead of
giving this error.
Thanks,
Nathaniel Flath
diff -u -r1.131 cli-cmds.c
--- cli/cli-cmds.c 13 Jun 2012 15:47:15 -0000 1.131
+++ cli/cli-cmds.c 5 Jul 2012 02:26:36 -0000
@@ -367,7 +367,7 @@
dont_repeat ();
if (dir == 0)
- error_no_arg (_("new working directory"));
+ dir = "~";
dir = tilde_expand (dir);
make_cleanup (xfree, dir);
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH] cd command defaults to ~ 2012-07-05 2:31 [PATCH] cd command defaults to ~ Nathaniel Flath @ 2012-07-05 14:00 ` Jan Kratochvil 2012-07-05 17:34 ` Nathaniel Flath 0 siblings, 1 reply; 25+ messages in thread From: Jan Kratochvil @ 2012-07-05 14:00 UTC (permalink / raw) To: Nathaniel Flath; +Cc: gdb-patches On Thu, 05 Jul 2012 04:31:07 +0200, Nathaniel Flath wrote: > 'cd' in bash defaults to ~, whereas in gdb will throw an error. This > patch has the 'cd' command in gdb use '~' as a default instead of > giving this error. FYI I do not find it too much required, 'cd ~' is not such a burden, one may expect that 'cd' without parameters will do 'pwd' (which it does not) etc. Therefore I do not approve it on my own unless someone else does. It would need an update in doc/doc/gdb.texinfo and probably even gdb/NEWS. Regards, Jan ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-07-05 14:00 ` Jan Kratochvil @ 2012-07-05 17:34 ` Nathaniel Flath 2012-07-05 17:50 ` Eli Zaretskii 2012-07-05 18:09 ` Tom Tromey 0 siblings, 2 replies; 25+ messages in thread From: Nathaniel Flath @ 2012-07-05 17:34 UTC (permalink / raw) To: Jan Kratochvil; +Cc: gdb-patches It's certainly not a huge deal - just something that's been annoying me for a while. As for other possible behaviours - I think the POSIX standard for 'cd' with no arguments is to use the HOME directory, if it is set - http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html is what I was looking at, so I don't think there would be too many people expecting a completely different behaviour . I'd be willing to update the two documents you mentioned, if this is an acceptable change. Thanks, Nathaniel Flath On Thu, Jul 5, 2012 at 7:00 AM, Jan Kratochvil <jan.kratochvil@redhat.com> wrote: > On Thu, 05 Jul 2012 04:31:07 +0200, Nathaniel Flath wrote: >> 'cd' in bash defaults to ~, whereas in gdb will throw an error. This >> patch has the 'cd' command in gdb use '~' as a default instead of >> giving this error. > > FYI I do not find it too much required, 'cd ~' is not such a burden, one may > expect that 'cd' without parameters will do 'pwd' (which it does not) etc. > Therefore I do not approve it on my own unless someone else does. > > It would need an update in doc/doc/gdb.texinfo and probably even gdb/NEWS. > > > Regards, > Jan ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-07-05 17:34 ` Nathaniel Flath @ 2012-07-05 17:50 ` Eli Zaretskii 2012-07-05 18:09 ` Tom Tromey 1 sibling, 0 replies; 25+ messages in thread From: Eli Zaretskii @ 2012-07-05 17:50 UTC (permalink / raw) To: Nathaniel Flath; +Cc: jan.kratochvil, gdb-patches > Date: Thu, 5 Jul 2012 10:34:19 -0700 > From: Nathaniel Flath <flat0103@gmail.com> > Cc: gdb-patches@sourceware.org > > As for other possible behaviours - I think the POSIX > standard for 'cd' with no arguments is to use the HOME directory, if > it is set - http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html > is what I was looking at, so I don't think there would be too many > people expecting a completely different behaviour. You'd be surprised what Windows users expect to see as result of typing "cd" without an argument ;-) (Not that I object to the change you propose, though.) ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-07-05 17:34 ` Nathaniel Flath 2012-07-05 17:50 ` Eli Zaretskii @ 2012-07-05 18:09 ` Tom Tromey 2012-07-07 4:29 ` Nathaniel Flath 1 sibling, 1 reply; 25+ messages in thread From: Tom Tromey @ 2012-07-05 18:09 UTC (permalink / raw) To: Nathaniel Flath; +Cc: Jan Kratochvil, gdb-patches >>>>> "Nathaniel" == Nathaniel Flath <flat0103@gmail.com> writes: Nathaniel> I'd be willing to update the two documents you mentioned, if Nathaniel> this is an acceptable change. I think it would be fine. I think mimicking bash is a good enough reason here. Tom ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-07-05 18:09 ` Tom Tromey @ 2012-07-07 4:29 ` Nathaniel Flath 2012-07-07 6:17 ` Jan Kratochvil 0 siblings, 1 reply; 25+ messages in thread From: Nathaniel Flath @ 2012-07-07 4:29 UTC (permalink / raw) To: Tom Tromey; +Cc: Jan Kratochvil, gdb-patches Here's the patch w/ the documentation added. Thanks, Nathaniel Flath Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.533 diff -u -r1.533 NEWS --- NEWS 4 Jul 2012 20:49:56 -0000 1.533 +++ NEWS 7 Jul 2012 04:28:05 -0000 @@ -3,6 +3,8 @@ *** Changes since GDB 7.4 +* The 'cd' command now defaults to using '~' if not given an argument. + * GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/> for more x32 ABI info. Index: cli/cli-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v retrieving revision 1.131 diff -u -r1.131 cli-cmds.c --- cli/cli-cmds.c 13 Jun 2012 15:47:15 -0000 1.131 +++ cli/cli-cmds.c 7 Jul 2012 04:28:05 -0000 @@ -367,7 +367,7 @@ dont_repeat (); if (dir == 0) - error_no_arg (_("new working directory")); + dir = "~"; dir = tilde_expand (dir); make_cleanup (xfree, dir); Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.990 diff -u -r1.990 gdb.texinfo --- doc/gdb.texinfo 5 Jul 2012 01:08:24 -0000 1.990 +++ doc/gdb.texinfo 7 Jul 2012 04:28:06 -0000 @@ -2275,7 +2275,8 @@ @kindex cd @cindex change working directory @item cd @var{directory} -Set the @value{GDBN} working directory to @var{directory}. +Set the @value{GDBN} working directory to @var{directory}. If given no +arguments, uses '~'. @kindex pwd @item pwd On Thu, Jul 5, 2012 at 11:09 AM, Tom Tromey <tromey@redhat.com> wrote: >>>>>> "Nathaniel" == Nathaniel Flath <flat0103@gmail.com> writes: > > Nathaniel> I'd be willing to update the two documents you mentioned, if > Nathaniel> this is an acceptable change. > > I think it would be fine. > I think mimicking bash is a good enough reason here. > > Tom ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-07-07 4:29 ` Nathaniel Flath @ 2012-07-07 6:17 ` Jan Kratochvil [not found] ` <CAPrg3HBCBs5tmuM9qH=Q=_PgPVb8Rb-=fbPX_ZSy1dEWgKcY9g@mail.gmail.com> 0 siblings, 1 reply; 25+ messages in thread From: Jan Kratochvil @ 2012-07-07 6:17 UTC (permalink / raw) To: Nathaniel Flath; +Cc: Tom Tromey, gdb-patches On Sat, 07 Jul 2012 06:29:04 +0200, Nathaniel Flath wrote: > Here's the patch w/ the documentation added. There should be also ChangeLog entry for it. Regards, Jan ^ permalink raw reply [flat|nested] 25+ messages in thread
[parent not found: <CAPrg3HBCBs5tmuM9qH=Q=_PgPVb8Rb-=fbPX_ZSy1dEWgKcY9g@mail.gmail.com>]
[parent not found: <20120722163408.GA20790@host2.jankratochvil.net>]
* Re: [PATCH] cd command defaults to ~ [not found] ` <20120722163408.GA20790@host2.jankratochvil.net> @ 2012-07-22 16:37 ` Nathaniel Flath 2012-07-22 16:50 ` Jan Kratochvil 2012-07-22 17:13 ` Eli Zaretskii 0 siblings, 2 replies; 25+ messages in thread From: Nathaniel Flath @ 2012-07-22 16:37 UTC (permalink / raw) To: Jan Kratochvil, Tom Tromey, gdb-patches Whoops, missed this email for a bit. Patch w/ changelog: index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.533 diff -u -r1.533 NEWS --- NEWS 4 Jul 2012 20:49:56 -0000 1.533 +++ NEWS 7 Jul 2012 04:28:05 -0000 @@ -3,6 +3,8 @@ *** Changes since GDB 7.4 +* The 'cd' command now defaults to using '~' if not given an argument. + * GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/> for more x32 ABI info. Index: cli/cli-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v retrieving revision 1.131 diff -u -r1.131 cli-cmds.c --- cli/cli-cmds.c 13 Jun 2012 15:47:15 -0000 1.131 +++ cli/cli-cmds.c 7 Jul 2012 04:28:05 -0000 @@ -367,7 +367,7 @@ dont_repeat (); if (dir == 0) - error_no_arg (_("new working directory")); + dir = "~"; dir = tilde_expand (dir); make_cleanup (xfree, dir); Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.990 diff -u -r1.990 gdb.texinfo --- doc/gdb.texinfo 5 Jul 2012 01:08:24 -0000 1.990 +++ doc/gdb.texinfo 7 Jul 2012 04:28:06 -0000 @@ -2275,7 +2275,8 @@ @kindex cd @cindex change working directory @item cd @var{directory} -Set the @value{GDBN} working directory to @var{directory}. +Set the @value{GDBN} working directory to @var{directory}. If given no +arguments, uses '~'. @kindex pwd @item pwd Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.14434 diff -u -r1.14434 ChangeLog--- ChangeLog 5 Jul 2012 01:03:01 -0000 1.14434 +++ ChangeLog 21 Jul 2012 19:25:52 -0000 @@ -1,3 +1,6 @@ +2012-07-21 Nathaniel Flath <flat0103@gmail.com> + * cli-cmds.c (cd_command) changed default argument to '~'. + 2012-07-05 Hui Zhu <hui_zhu@mentor.com> * ax-gdb.c (cli/cli-utils.h): New include. On Sun, Jul 22, 2012 at 9:34 AM, Jan Kratochvil <jan.kratochvil@redhat.com> wrote: > On Sat, 21 Jul 2012 21:27:42 +0200, Nathaniel Flath wrote: >> Whoops, missed this email for a bit. > > Missing the Cc line: > Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org > > > Thanks, > Jan ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-07-22 16:37 ` Nathaniel Flath @ 2012-07-22 16:50 ` Jan Kratochvil 2012-07-23 7:42 ` Sergio Durigan Junior 2012-07-23 14:14 ` Tom Tromey 2012-07-22 17:13 ` Eli Zaretskii 1 sibling, 2 replies; 25+ messages in thread From: Jan Kratochvil @ 2012-07-22 16:50 UTC (permalink / raw) To: Nathaniel Flath; +Cc: Tom Tromey, gdb-patches On Sun, 22 Jul 2012 18:37:04 +0200, Nathaniel Flath wrote: > Whoops, missed this email for a bit. > +2012-07-21 Nathaniel Flath <flat0103@gmail.com> > + * cli-cmds.c (cd_command) changed default argument to '~'. This is not a real ChangeLog, see other entries plus: http://www.gnu.org/prep/standards/standards.html#Change-Logs BTW it is better not to modify the ChangeLog file(s) itself but write is as a text along the patch, the repository ChangeLog file(s) as constantly changing. Your ChangeLog should have been, including the spacing: gdb/ 2012-07-21 Nathaniel Flath <flat0103@gmail.com> * NEWS: New entry for 'cd' default parameters. * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment. doc/ 2012-07-21 Nathaniel Flath <flat0103@gmail.com> * gdb.texinfo (Working Directory): <FIXME> But the doc patch part does not seem to be right to me (although authoritative is Eli). I would probably create a new entry besides 'cd DIRECTORY' and 'pwd' also 'cd' (without DIRECTORY). Or one can modify 'cd DIRECTORY' to be 'cd [DIRECTORY]' instead. I guess Tom assumes no FSF copyright assignment is needed for this patch, Tom? Thanks, Jan ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-07-22 16:50 ` Jan Kratochvil @ 2012-07-23 7:42 ` Sergio Durigan Junior 2012-07-23 14:14 ` Tom Tromey 1 sibling, 0 replies; 25+ messages in thread From: Sergio Durigan Junior @ 2012-07-23 7:42 UTC (permalink / raw) To: Jan Kratochvil; +Cc: Nathaniel Flath, Tom Tromey, gdb-patches On Sunday, July 22 2012, Jan Kratochvil wrote: > I guess Tom assumes no FSF copyright assignment is needed for this patch, Tom? The patch seems obvious enough indeed, but if the copyright assignment is needed please contact me offlist and I can send the form to you. -- Sergio ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-07-22 16:50 ` Jan Kratochvil 2012-07-23 7:42 ` Sergio Durigan Junior @ 2012-07-23 14:14 ` Tom Tromey 2012-08-04 5:55 ` Nathaniel Flath 1 sibling, 1 reply; 25+ messages in thread From: Tom Tromey @ 2012-07-23 14:14 UTC (permalink / raw) To: Jan Kratochvil; +Cc: Nathaniel Flath, gdb-patches >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes: Jan> I guess Tom assumes no FSF copyright assignment is needed for this Jan> patch, Tom? I think it is small enough. Tom ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-07-23 14:14 ` Tom Tromey @ 2012-08-04 5:55 ` Nathaniel Flath 2012-08-04 6:05 ` Sergio Durigan Junior 2012-08-04 7:11 ` Eli Zaretskii 0 siblings, 2 replies; 25+ messages in thread From: Nathaniel Flath @ 2012-08-04 5:55 UTC (permalink / raw) To: Tom Tromey; +Cc: Jan Kratochvil, gdb-patches Sorry for the late reply again. In any case, I've done FSF assignment for Emacs. Patch w/ recommended updates follows: ChangeLog gdb/ 2012-07-21 Nathaniel Flath <flat0103@gmail.com> * NEWS: New entry for 'cd' default parameters. * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment. doc/ 2012-07-21 Nathaniel Flath <flat0103@gmail.com> * gdb.texinfo (Working Directory): Added information about new default argument for 'cd' command. index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.533 diff -u -r1.533 NEWS --- NEWS 4 Jul 2012 20:49:56 -0000 1.533 +++ NEWS 7 Jul 2012 04:28:05 -0000 @@ -3,6 +3,8 @@ *** Changes since GDB 7.4 +* The 'cd' command now defaults to using '~'(the home directory) if not given an argument. + * GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/> for more x32 ABI info. Index: cli/cli-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v retrieving revision 1.131 diff -u -r1.131 cli-cmds.c --- cli/cli-cmds.c 13 Jun 2012 15:47:15 -0000 1.131 +++ cli/cli-cmds.c 7 Jul 2012 04:28:05 -0000 @@ -367,7 +367,7 @@ dont_repeat (); if (dir == 0) - error_no_arg (_("new working directory")); + dir = "~"; dir = tilde_expand (dir); make_cleanup (xfree, dir); Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.990 diff -u -r1.990 gdb.texinfo --- doc/gdb.texinfo 5 Jul 2012 01:08:24 -0000 1.990 +++ doc/gdb.texinfo 7 Jul 2012 04:28:06 -0000 @@ -2275,7 +2275,8 @@ @kindex cd @cindex change working directory -@item cd @var{directory} -Set the @value{GDBN} working directory to @var{directory}. +@item cd @r{[}@var{directory}@r{]} +Set the @value{GDBN} working directory to @var{directory}. If not +given, +@var{directory} uses @file'~'. @kindex pwd @item pwd On Mon, Jul 23, 2012 at 7:13 AM, Tom Tromey <tromey@redhat.com> wrote: >>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes: > > Jan> I guess Tom assumes no FSF copyright assignment is needed for this > Jan> patch, Tom? > > I think it is small enough. > > Tom ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-08-04 5:55 ` Nathaniel Flath @ 2012-08-04 6:05 ` Sergio Durigan Junior 2012-08-04 7:11 ` Eli Zaretskii 1 sibling, 0 replies; 25+ messages in thread From: Sergio Durigan Junior @ 2012-08-04 6:05 UTC (permalink / raw) To: Nathaniel Flath; +Cc: Tom Tromey, Jan Kratochvil, gdb-patches On Saturday, August 04 2012, Nathaniel Flath wrote: > Sorry for the late reply again. > > In any case, I've done FSF assignment for Emacs. The copyright assignment must be done for each project you are contributing. Tom said your changes are small and you don't need one for GDB, so it is OK. However, if you ever need to get one, please mail me off-list and I can send you the form. -- Sergio ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-08-04 5:55 ` Nathaniel Flath 2012-08-04 6:05 ` Sergio Durigan Junior @ 2012-08-04 7:11 ` Eli Zaretskii 2012-08-04 17:10 ` Nathaniel Flath 1 sibling, 1 reply; 25+ messages in thread From: Eli Zaretskii @ 2012-08-04 7:11 UTC (permalink / raw) To: Nathaniel Flath; +Cc: tromey, jan.kratochvil, gdb-patches > Date: Fri, 3 Aug 2012 22:55:10 -0700 > From: Nathaniel Flath <flat0103@gmail.com> > Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org > > --- NEWS 4 Jul 2012 20:49:56 -0000 1.533 > +++ NEWS 7 Jul 2012 04:28:05 -0000 > @@ -3,6 +3,8 @@ > > *** Changes since GDB 7.4 > > +* The 'cd' command now defaults to using '~'(the home directory) if > not given an argument. ^^ A blank is missing. > +Set the @value{GDBN} working directory to @var{directory}. If not > +given, +@var{directory} uses @file'~'. ^ ^^^^^^^^ Please delete the extra '+', and please use "@file{~}". The documentation part is OK with these changes. Thanks. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-08-04 7:11 ` Eli Zaretskii @ 2012-08-04 17:10 ` Nathaniel Flath 2012-08-04 17:16 ` Eli Zaretskii 0 siblings, 1 reply; 25+ messages in thread From: Nathaniel Flath @ 2012-08-04 17:10 UTC (permalink / raw) To: Eli Zaretskii; +Cc: tromey, jan.kratochvil, gdb-patches Changes Eli requested. Thanks, Nathaniel Flath ChangeLog gdb/ 2012-07-21 Nathaniel Flath <flat0103@gmail.com> * NEWS: New entry for 'cd' default parameters. * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment. doc/ 2012-07-21 Nathaniel Flath <flat0103@gmail.com> * gdb.texinfo (Working Directory): Added information about new default argument for 'cd' command. index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.533 diff -u -r1.533 NEWS --- NEWS 4 Jul 2012 20:49:56 -0000 1.533 +++ NEWS 7 Jul 2012 04:28:05 -0000 @@ -3,6 +3,8 @@ *** Changes since GDB 7.4 +* The 'cd' command now defaults to using '~' (the home directory) if + not given an argument. * GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/> for more x32 ABI info. Index: cli/cli-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v retrieving revision 1.131 diff -u -r1.131 cli-cmds.c --- cli/cli-cmds.c 13 Jun 2012 15:47:15 -0000 1.131 +++ cli/cli-cmds.c 7 Jul 2012 04:28:05 -0000 @@ -367,7 +367,7 @@ dont_repeat (); if (dir == 0) - error_no_arg (_("new working directory")); + dir = "~"; dir = tilde_expand (dir); make_cleanup (xfree, dir); Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.990 diff -u -r1.990 gdb.texinfo --- doc/gdb.texinfo 5 Jul 2012 01:08:24 -0000 1.990 +++ doc/gdb.texinfo 7 Jul 2012 04:28:06 -0000 @@ -2275,7 +2275,8 @@ @kindex cd @cindex change working directory -@item cd @var{directory} -Set the @value{GDBN} working directory to @var{directory}. +@item cd @r{[}@var{directory}@r{]} +Set the @value{GDBN} working directory to @var{directory}. If not +given, @var{directory} uses @file{'~'}. @kindex pwd @item pwd On Sat, Aug 4, 2012 at 12:10 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> Date: Fri, 3 Aug 2012 22:55:10 -0700 >> From: Nathaniel Flath <flat0103@gmail.com> >> Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org >> >> --- NEWS 4 Jul 2012 20:49:56 -0000 1.533 >> +++ NEWS 7 Jul 2012 04:28:05 -0000 >> @@ -3,6 +3,8 @@ >> >> *** Changes since GDB 7.4 >> >> +* The 'cd' command now defaults to using '~'(the home directory) if >> not given an argument. ^^ > > A blank is missing. > >> +Set the @value{GDBN} working directory to @var{directory}. If not >> +given, +@var{directory} uses @file'~'. > ^ ^^^^^^^^ > Please delete the extra '+', and please use "@file{~}". > > The documentation part is OK with these changes. > > Thanks. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-08-04 17:10 ` Nathaniel Flath @ 2012-08-04 17:16 ` Eli Zaretskii 2012-08-04 18:16 ` Nathaniel Flath 0 siblings, 1 reply; 25+ messages in thread From: Eli Zaretskii @ 2012-08-04 17:16 UTC (permalink / raw) To: Nathaniel Flath; +Cc: tromey, jan.kratochvil, gdb-patches > Date: Sat, 4 Aug 2012 10:10:37 -0700 > From: Nathaniel Flath <flat0103@gmail.com> > Cc: tromey@redhat.com, jan.kratochvil@redhat.com, gdb-patches@sourceware.org > > Changes Eli requested. Thanks, this is OK. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-08-04 17:16 ` Eli Zaretskii @ 2012-08-04 18:16 ` Nathaniel Flath 2012-08-04 18:28 ` Jan Kratochvil 0 siblings, 1 reply; 25+ messages in thread From: Nathaniel Flath @ 2012-08-04 18:16 UTC (permalink / raw) To: Eli Zaretskii; +Cc: tromey, jan.kratochvil, gdb-patches Is there anything else I need to do, anyone? Thanks, Nathaniel Flath On Sat, Aug 4, 2012 at 10:16 AM, Eli Zaretskii <eliz@gnu.org> wrote: >> Date: Sat, 4 Aug 2012 10:10:37 -0700 >> From: Nathaniel Flath <flat0103@gmail.com> >> Cc: tromey@redhat.com, jan.kratochvil@redhat.com, gdb-patches@sourceware.org >> >> Changes Eli requested. > > Thanks, this is OK. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-08-04 18:16 ` Nathaniel Flath @ 2012-08-04 18:28 ` Jan Kratochvil [not found] ` <CAPrg3HDpFytQmCHe2GSzW=_ckAcNXN5UPJ5qPWDPHgwzY8RWzw@mail.gmail.com> 0 siblings, 1 reply; 25+ messages in thread From: Jan Kratochvil @ 2012-08-04 18:28 UTC (permalink / raw) To: Nathaniel Flath; +Cc: Eli Zaretskii, tromey, gdb-patches On Sat, 04 Aug 2012 20:16:32 +0200, Nathaniel Flath wrote: > Is there anything else I need to do, anyone? The patch is not applicable: patching file NEWS patch: **** malformed patch at line 34: * GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/> Unaware why. Most probably the issue gets resolved if you attach the patch (and not inline it). It would be better to reconfigure your MUA so that the inserted patch info mail text is not corrupted. Thanks, Jan ^ permalink raw reply [flat|nested] 25+ messages in thread
[parent not found: <CAPrg3HDpFytQmCHe2GSzW=_ckAcNXN5UPJ5qPWDPHgwzY8RWzw@mail.gmail.com>]
* Re: [PATCH] cd command defaults to ~ [not found] ` <CAPrg3HDpFytQmCHe2GSzW=_ckAcNXN5UPJ5qPWDPHgwzY8RWzw@mail.gmail.com> @ 2012-08-06 9:15 ` Nathaniel Flath 2012-08-06 18:43 ` [commit] " Jan Kratochvil 0 siblings, 1 reply; 25+ messages in thread From: Nathaniel Flath @ 2012-08-06 9:15 UTC (permalink / raw) To: Jan Kratochvil; +Cc: Eli Zaretskii, tromey, gdb-patches [-- Attachment #1: Type: text/plain, Size: 1577 bytes --] Thanks, Nathaniel Flath ChangeLog gdb/ 2012-07-21 Nathaniel Flath <flat0103@gmail.com> * NEWS: New entry for 'cd' default parameters. * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment. doc/ 2012-07-21 Nathaniel Flath <flat0103@gmail.com> * gdb.texinfo (Working Directory): Added information about new default argument for 'cd' command. On Mon, Aug 6, 2012 at 1:54 AM, Nathaniel Flath <flat0103@gmail.com> wrote: > > Here it is, with the patch attached. > > > Thanks, > Nathaniel Flath > > > > ChangeLog > gdb/ > 2012-07-21 Nathaniel Flath <flat0103@gmail.com> > > * NEWS: New entry for 'cd' default parameters. > * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment. > > doc/ > 2012-07-21 Nathaniel Flath <flat0103@gmail.com> > > * gdb.texinfo (Working Directory): Added information about new > default argument for 'cd' command. > > > On Sat, Aug 4, 2012 at 11:27 AM, Jan Kratochvil <jan.kratochvil@redhat.com> wrote: > > On Sat, 04 Aug 2012 20:16:32 +0200, Nathaniel Flath wrote: > >> Is there anything else I need to do, anyone? > > > > The patch is not applicable: > > patching file NEWS > > patch: **** malformed patch at line 34: * GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/> > > > > Unaware why. Most probably the issue gets resolved if you attach the patch > > (and not inline it). It would be better to reconfigure your MUA so that the > > inserted patch info mail text is not corrupted. > > > > > > Thanks, > > Jan > [-- Attachment #2: cd.patch --] [-- Type: application/octet-stream, Size: 1579 bytes --] Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.533 diff -u -r1.533 NEWS --- NEWS 4 Jul 2012 20:49:56 -0000 1.533 +++ NEWS 6 Aug 2012 08:51:48 -0000 @@ -3,6 +3,9 @@ *** Changes since GDB 7.4 +* The 'cd' command now defaults to using '~' (the home directory) if not + given an argument. + * GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/> for more x32 ABI info. Index: cli/cli-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v retrieving revision 1.131 diff -u -r1.131 cli-cmds.c --- cli/cli-cmds.c 13 Jun 2012 15:47:15 -0000 1.131 +++ cli/cli-cmds.c 6 Aug 2012 08:51:48 -0000 @@ -367,7 +367,7 @@ dont_repeat (); if (dir == 0) - error_no_arg (_("new working directory")); + dir = "~"; dir = tilde_expand (dir); make_cleanup (xfree, dir); Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.990 diff -u -r1.990 gdb.texinfo --- doc/gdb.texinfo 5 Jul 2012 01:08:24 -0000 1.990 +++ doc/gdb.texinfo 6 Aug 2012 08:51:49 -0000 @@ -2274,8 +2274,9 @@ @table @code @kindex cd @cindex change working directory -@item cd @var{directory} -Set the @value{GDBN} working directory to @var{directory}. +@item cd @r{[}@var{directory}@r{]} +Set the @value{GDBN} working directory to @var{directory}. If not +given, @var{directory} uses @file{'~'}. @kindex pwd @item pwd ^ permalink raw reply [flat|nested] 25+ messages in thread
* [commit] [PATCH] cd command defaults to ~ 2012-08-06 9:15 ` Nathaniel Flath @ 2012-08-06 18:43 ` Jan Kratochvil 2012-08-07 5:52 ` [obv] testsuite: default.exp: Fix cd regression [Re: [commit] [PATCH] cd command defaults to ~] Jan Kratochvil 2012-08-07 7:31 ` [commit] [PATCH] cd command defaults to ~ Nathaniel Flath 0 siblings, 2 replies; 25+ messages in thread From: Jan Kratochvil @ 2012-08-06 18:43 UTC (permalink / raw) To: Nathaniel Flath; +Cc: Eli Zaretskii, tromey, gdb-patches On Mon, 06 Aug 2012 11:14:57 +0200, Nathaniel Flath wrote: > gdb/ > 2012-07-21 Nathaniel Flath <flat0103@gmail.com> > > * NEWS: New entry for 'cd' default parameters. > * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment. > > doc/ gdb/doc/ > 2012-07-21 Nathaniel Flath <flat0103@gmail.com> > > * gdb.texinfo (Working Directory): Added information about new > default argument for 'cd' command. ^^ Here the indentation should be two spaces left, ignoring '* ' above. The NEWS entry was against too old tree, adjusted its position (to be post-7.5). Thanks, Jan http://sourceware.org/ml/gdb-cvs/2012-08/msg00048.html --- src/gdb/ChangeLog 2012/08/03 20:52:46 1.14559 +++ src/gdb/ChangeLog 2012/08/06 17:13:23 1.14560 @@ -1,3 +1,8 @@ +2012-08-06 Nathaniel Flath <flat0103@gmail.com> + + * NEWS: New entry for 'cd' default parameters. + * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment. + 2012-08-03 Tom Tromey <tromey@redhat.com> * dwarf2-frame.c (dwarf2_frame_cache): Call do_cleanups before --- src/gdb/NEWS 2012/07/26 15:28:21 1.537 +++ src/gdb/NEWS 2012/08/06 17:13:26 1.538 @@ -3,6 +3,9 @@ *** Changes since GDB 7.5 +* The 'cd' command now defaults to using '~' (the home directory) if not + given an argument. + * New configure options --enable-libmcheck/--disable-libmcheck --- src/gdb/cli/cli-cmds.c 2012/07/26 16:57:22 1.132 +++ src/gdb/cli/cli-cmds.c 2012/08/06 17:13:26 1.133 @@ -365,7 +365,7 @@ dont_repeat (); if (dir == 0) - error_no_arg (_("new working directory")); + dir = "~"; dir = tilde_expand (dir); make_cleanup (xfree, dir); --- src/gdb/doc/ChangeLog 2012/08/06 14:28:45 1.1352 +++ src/gdb/doc/ChangeLog 2012/08/06 17:13:27 1.1353 @@ -1,3 +1,8 @@ +2012-08-06 Nathaniel Flath <flat0103@gmail.com> + + * gdb.texinfo (Working Directory): Added information about new + default argument for 'cd' command. + 2012-08-06 Yao Qi <yao@codesourcery.com> * gdb.texinfo (Remote Configuration): Add kindex for 'set --- src/gdb/doc/gdb.texinfo 2012/08/06 14:28:45 1.996 +++ src/gdb/doc/gdb.texinfo 2012/08/06 17:13:27 1.997 @@ -2267,8 +2267,9 @@ @table @code @kindex cd @cindex change working directory -@item cd @var{directory} -Set the @value{GDBN} working directory to @var{directory}. +@item cd @r{[}@var{directory}@r{]} +Set the @value{GDBN} working directory to @var{directory}. If not +given, @var{directory} uses @file{'~'}. @kindex pwd @item pwd ^ permalink raw reply [flat|nested] 25+ messages in thread
* [obv] testsuite: default.exp: Fix cd regression [Re: [commit] [PATCH] cd command defaults to ~] 2012-08-06 18:43 ` [commit] " Jan Kratochvil @ 2012-08-07 5:52 ` Jan Kratochvil 2012-08-07 7:31 ` [commit] [PATCH] cd command defaults to ~ Nathaniel Flath 1 sibling, 0 replies; 25+ messages in thread From: Jan Kratochvil @ 2012-08-07 5:52 UTC (permalink / raw) To: Nathaniel Flath; +Cc: Eli Zaretskii, tromey, gdb-patches On Mon, 06 Aug 2012 19:14:37 +0200, Jan Kratochvil wrote: > On Mon, 06 Aug 2012 11:14:57 +0200, Nathaniel Flath wrote: > > gdb/ > > 2012-07-21 Nathaniel Flath <flat0103@gmail.com> > > > > * NEWS: New entry for 'cd' default parameters. > > * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment. It has caused: cd -Argument required (new working directory). -(gdb) PASS: gdb.base/default.exp: cd +Working directory /home/jkratoch. +(gdb) FAIL: gdb.base/default.exp: cd One should run a regression testsuite, I forgot you did not. Checked in. Jan http://sourceware.org/ml/gdb-cvs/2012-08/msg00059.html --- src/gdb/testsuite/ChangeLog 2012/08/06 20:14:10 1.3326 +++ src/gdb/testsuite/ChangeLog 2012/08/07 05:49:01 1.3327 @@ -1,3 +1,7 @@ +2012-08-07 Jan Kratochvil <jan.kratochvil@redhat.com> + + * gdb.base/default.exp (cd): Accept new directory with no arguments. + 2012-08-06 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.base/list.exp (test_only_end): New function. --- src/gdb/testsuite/gdb.base/default.exp 2012/04/27 20:52:06 1.59 +++ src/gdb/testsuite/gdb.base/default.exp 2012/08/07 05:49:02 1.60 @@ -84,7 +84,7 @@ gdb_test "catch" "Catch requires an event name..*" "catch" #test cd -gdb_test "cd" "Argument required .new working directory.*" "cd" +gdb_test "cd" "Working directory \[^\r\n\]*\\." #test clear gdb_test "clear" "No source file specified..*" "clear" ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [commit] [PATCH] cd command defaults to ~ 2012-08-06 18:43 ` [commit] " Jan Kratochvil 2012-08-07 5:52 ` [obv] testsuite: default.exp: Fix cd regression [Re: [commit] [PATCH] cd command defaults to ~] Jan Kratochvil @ 2012-08-07 7:31 ` Nathaniel Flath 2012-08-07 7:53 ` Jan Kratochvil 1 sibling, 1 reply; 25+ messages in thread From: Nathaniel Flath @ 2012-08-07 7:31 UTC (permalink / raw) To: Jan Kratochvil; +Cc: Eli Zaretskii, tromey, gdb-patches Sorry - I saw your later email about the regression - do I need to fix this commit or did you fix/apply it? Thanks, Nathaniel Flath On Mon, Aug 6, 2012 at 10:14 AM, Jan Kratochvil <jan.kratochvil@redhat.com> wrote: > On Mon, 06 Aug 2012 11:14:57 +0200, Nathaniel Flath wrote: >> gdb/ >> 2012-07-21 Nathaniel Flath <flat0103@gmail.com> >> >> * NEWS: New entry for 'cd' default parameters. >> * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment. >> >> doc/ > gdb/doc/ >> 2012-07-21 Nathaniel Flath <flat0103@gmail.com> >> >> * gdb.texinfo (Working Directory): Added information about new >> default argument for 'cd' command. > ^^ > Here the indentation should be two spaces left, ignoring '* ' above. > > The NEWS entry was against too old tree, adjusted its position (to be post-7.5). > > > Thanks, > Jan > > > http://sourceware.org/ml/gdb-cvs/2012-08/msg00048.html > > --- src/gdb/ChangeLog 2012/08/03 20:52:46 1.14559 > +++ src/gdb/ChangeLog 2012/08/06 17:13:23 1.14560 > @@ -1,3 +1,8 @@ > +2012-08-06 Nathaniel Flath <flat0103@gmail.com> > + > + * NEWS: New entry for 'cd' default parameters. > + * cli/cli-cmds.c (cd_command): Replace error_no_arg by DIR assignment. > + > 2012-08-03 Tom Tromey <tromey@redhat.com> > > * dwarf2-frame.c (dwarf2_frame_cache): Call do_cleanups before > --- src/gdb/NEWS 2012/07/26 15:28:21 1.537 > +++ src/gdb/NEWS 2012/08/06 17:13:26 1.538 > @@ -3,6 +3,9 @@ > > *** Changes since GDB 7.5 > > +* The 'cd' command now defaults to using '~' (the home directory) if not > + given an argument. > + > * New configure options > > --enable-libmcheck/--disable-libmcheck > --- src/gdb/cli/cli-cmds.c 2012/07/26 16:57:22 1.132 > +++ src/gdb/cli/cli-cmds.c 2012/08/06 17:13:26 1.133 > @@ -365,7 +365,7 @@ > dont_repeat (); > > if (dir == 0) > - error_no_arg (_("new working directory")); > + dir = "~"; > > dir = tilde_expand (dir); > make_cleanup (xfree, dir); > --- src/gdb/doc/ChangeLog 2012/08/06 14:28:45 1.1352 > +++ src/gdb/doc/ChangeLog 2012/08/06 17:13:27 1.1353 > @@ -1,3 +1,8 @@ > +2012-08-06 Nathaniel Flath <flat0103@gmail.com> > + > + * gdb.texinfo (Working Directory): Added information about new > + default argument for 'cd' command. > + > 2012-08-06 Yao Qi <yao@codesourcery.com> > > * gdb.texinfo (Remote Configuration): Add kindex for 'set > --- src/gdb/doc/gdb.texinfo 2012/08/06 14:28:45 1.996 > +++ src/gdb/doc/gdb.texinfo 2012/08/06 17:13:27 1.997 > @@ -2267,8 +2267,9 @@ > @table @code > @kindex cd > @cindex change working directory > -@item cd @var{directory} > -Set the @value{GDBN} working directory to @var{directory}. > +@item cd @r{[}@var{directory}@r{]} > +Set the @value{GDBN} working directory to @var{directory}. If not > +given, @var{directory} uses @file{'~'}. > > @kindex pwd > @item pwd ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [commit] [PATCH] cd command defaults to ~ 2012-08-07 7:31 ` [commit] [PATCH] cd command defaults to ~ Nathaniel Flath @ 2012-08-07 7:53 ` Jan Kratochvil 2012-08-07 16:02 ` Nathaniel Flath 0 siblings, 1 reply; 25+ messages in thread From: Jan Kratochvil @ 2012-08-07 7:53 UTC (permalink / raw) To: Nathaniel Flath; +Cc: Eli Zaretskii, tromey, gdb-patches Hello Nathaniel, On Tue, 07 Aug 2012 09:30:44 +0200, Nathaniel Flath wrote: > Sorry - I saw your later email about the regression - do I need to fix > this commit or did you fix/apply it? I have already committed the fix: [obv] testsuite: default.exp: Fix cd regression [Re: [commit] [PATCH] cd command defaults to ~] http://sourceware.org/ml/gdb-patches/2012-08/msg00208.html Thanks, Jan ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [commit] [PATCH] cd command defaults to ~ 2012-08-07 7:53 ` Jan Kratochvil @ 2012-08-07 16:02 ` Nathaniel Flath 0 siblings, 0 replies; 25+ messages in thread From: Nathaniel Flath @ 2012-08-07 16:02 UTC (permalink / raw) To: Jan Kratochvil; +Cc: Eli Zaretskii, tromey, gdb-patches Thanks everyone! On Tue, Aug 7, 2012 at 12:53 AM, Jan Kratochvil <jan.kratochvil@redhat.com> wrote: > Hello Nathaniel, > > On Tue, 07 Aug 2012 09:30:44 +0200, Nathaniel Flath wrote: >> Sorry - I saw your later email about the regression - do I need to fix >> this commit or did you fix/apply it? > > I have already committed the fix: > [obv] testsuite: default.exp: Fix cd regression [Re: [commit] [PATCH] cd command defaults to ~] > http://sourceware.org/ml/gdb-patches/2012-08/msg00208.html > > > Thanks, > Jan ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] cd command defaults to ~ 2012-07-22 16:37 ` Nathaniel Flath 2012-07-22 16:50 ` Jan Kratochvil @ 2012-07-22 17:13 ` Eli Zaretskii 1 sibling, 0 replies; 25+ messages in thread From: Eli Zaretskii @ 2012-07-22 17:13 UTC (permalink / raw) To: Nathaniel Flath; +Cc: jan.kratochvil, tromey, gdb-patches > Date: Sun, 22 Jul 2012 09:37:04 -0700 > From: Nathaniel Flath <flat0103@gmail.com> > > index: NEWS > =================================================================== > RCS file: /cvs/src/src/gdb/NEWS,v > retrieving revision 1.533 > diff -u -r1.533 NEWS > --- NEWS 4 Jul 2012 20:49:56 -0000 1.533 > +++ NEWS 7 Jul 2012 04:28:05 -0000 > @@ -3,6 +3,8 @@ > > *** Changes since GDB 7.4 > > +* The 'cd' command now defaults to using '~' if not given an argument. OK, but since not everyone is born knowing what '~' means (think Windows users), I would suggest a small correction: The 'cd' command now defaults to using '~' (the home directory) if not given an argument. > @kindex cd > @cindex change working directory > @item cd @var{directory} As Jan points out, the DIRECTORY part is now optional, which we express by [...]. So: @item cd @r{[}@var{directory}@r{]} (The @r{} parts are needed to countermand the default @code formatting of the @item line.) > -Set the @value{GDBN} working directory to @var{directory}. > +Set the @value{GDBN} working directory to @var{directory}. If given no > +arguments, uses '~'. "~" is a file name, so please use @file{~} instead of quoting it. Also, I would replace the last sentence with If not given, @var{directory} defaults to @file{~}. OK with those changes. Thanks. ^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2012-08-07 16:02 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-05 2:31 [PATCH] cd command defaults to ~ Nathaniel Flath
2012-07-05 14:00 ` Jan Kratochvil
2012-07-05 17:34 ` Nathaniel Flath
2012-07-05 17:50 ` Eli Zaretskii
2012-07-05 18:09 ` Tom Tromey
2012-07-07 4:29 ` Nathaniel Flath
2012-07-07 6:17 ` Jan Kratochvil
[not found] ` <CAPrg3HBCBs5tmuM9qH=Q=_PgPVb8Rb-=fbPX_ZSy1dEWgKcY9g@mail.gmail.com>
[not found] ` <20120722163408.GA20790@host2.jankratochvil.net>
2012-07-22 16:37 ` Nathaniel Flath
2012-07-22 16:50 ` Jan Kratochvil
2012-07-23 7:42 ` Sergio Durigan Junior
2012-07-23 14:14 ` Tom Tromey
2012-08-04 5:55 ` Nathaniel Flath
2012-08-04 6:05 ` Sergio Durigan Junior
2012-08-04 7:11 ` Eli Zaretskii
2012-08-04 17:10 ` Nathaniel Flath
2012-08-04 17:16 ` Eli Zaretskii
2012-08-04 18:16 ` Nathaniel Flath
2012-08-04 18:28 ` Jan Kratochvil
[not found] ` <CAPrg3HDpFytQmCHe2GSzW=_ckAcNXN5UPJ5qPWDPHgwzY8RWzw@mail.gmail.com>
2012-08-06 9:15 ` Nathaniel Flath
2012-08-06 18:43 ` [commit] " Jan Kratochvil
2012-08-07 5:52 ` [obv] testsuite: default.exp: Fix cd regression [Re: [commit] [PATCH] cd command defaults to ~] Jan Kratochvil
2012-08-07 7:31 ` [commit] [PATCH] cd command defaults to ~ Nathaniel Flath
2012-08-07 7:53 ` Jan Kratochvil
2012-08-07 16:02 ` Nathaniel Flath
2012-07-22 17:13 ` Eli Zaretskii
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox