[PATCH] cd command defaults to ~

Nathaniel Flath
2012-07-05T02:31:21Z

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