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] cd command defaults to ~


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


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