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]

[PATCH] cd command defaults to ~


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);


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