This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] cd command defaults to ~
- From: Nathaniel Flath <flat0103 at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 4 Jul 2012 19:31:07 -0700
- Subject: [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);