aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-04 20:00:40 -0600
committerTom Tromey <tom@tromey.com>2019-10-01 15:12:39 -0600
commit14309bb6bfe31e5ad26035cd41a46bdbaec154b0 (patch)
tree3c886583045e6eb3268d7aceff9cf133ea381de2 /gdb/cli
parent6a831f06e1bdf3aff6acf7ae31e2a3a9795137a5 (diff)
downloadbinutils-14309bb6bfe31e5ad26035cd41a46bdbaec154b0.zip
binutils-14309bb6bfe31e5ad26035cd41a46bdbaec154b0.tar.gz
binutils-14309bb6bfe31e5ad26035cd41a46bdbaec154b0.tar.bz2
Style "pwd" output
This changes the "pwd" command to style its output. gdb/ChangeLog 2019-10-01 Tom Tromey <tom@tromey.com> * cli/cli-cmds.c (pwd_command): Style output. gdb/testsuite/ChangeLog 2019-10-01 Tom Tromey <tom@tromey.com> * gdb.base/style.exp: Test "pwd".
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-cmds.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 59c71f6..9f7b052 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -49,6 +49,7 @@
#include "cli/cli-script.h"
#include "cli/cli-setshow.h"
#include "cli/cli-cmds.h"
+#include "cli/cli-style.h"
#include "cli/cli-utils.h"
#include "extension.h"
@@ -451,10 +452,14 @@ pwd_command (const char *args, int from_tty)
safe_strerror (errno));
if (strcmp (cwd.get (), current_directory) != 0)
- printf_unfiltered (_("Working directory %s\n (canonically %s).\n"),
- current_directory, cwd.get ());
+ printf_unfiltered (_("Working directory %ps\n (canonically %ps).\n"),
+ styled_string (file_name_style.style (),
+ current_directory),
+ styled_string (file_name_style.style (), cwd.get ()));
else
- printf_unfiltered (_("Working directory %s.\n"), current_directory);
+ printf_unfiltered (_("Working directory %ps.\n"),
+ styled_string (file_name_style.style (),
+ current_directory));
}
void