This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] cd command defaults to ~
- From: Nathaniel Flath <flat0103 at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org
- Date: Fri, 3 Aug 2012 22:55:10 -0700
- Subject: Re: [PATCH] cd command defaults to ~
- References: <CAPrg3HBR9jZnmO77dHg-GFz75SXhV1XC+a8rR0Pzu0bnmE-bfQ@mail.gmail.com> <20120705140038.GB27886@host2.jankratochvil.net> <CAPrg3HAy524TOZ91jYKZXy7eCP2SpDwGKcq7O6NDh21VjBb93Q@mail.gmail.com> <87d34arsf3.fsf@fleche.redhat.com> <CAPrg3HCVZ8NQ7zX_Tb5eby0Wn4RHOAUe1oY4qNO4+pj3OVy3VA@mail.gmail.com> <20120707061655.GA28438@host2.jankratochvil.net> <CAPrg3HBCBs5tmuM9qH=Q=_PgPVb8Rb-=fbPX_ZSy1dEWgKcY9g@mail.gmail.com> <20120722163408.GA20790@host2.jankratochvil.net> <CAPrg3HA+mpqmBOLkhShuCm_HK0dRqfrZ=vTpfMG3cq2R_ANFNA@mail.gmail.com> <20120722164948.GA20982@host2.jankratochvil.net> <87sjcisgyj.fsf@fleche.redhat.com>
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