Skip to content
Browse files

Print short form of type name in "show -signal" output

  • Loading branch information...
1 parent 4afab2a commit 12dbd4d4ff47391f090172f6d216df423ee26059 @nickg committed Apr 7, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/rt/shell.c
View
7 src/rt/shell.c
@@ -131,9 +131,12 @@ static int shell_cmd_show(ClientData cd, Tcl_Interp *interp,
reply_read_signal_msg_t *reply = xmalloc(rsz);
slave_get_reply(REPLY_READ_SIGNAL, reply, rsz);
- printf("%-30s%-25s%s\n",
+ const char *type_str = type_pp(tree_type(d));
+ const char *short_name = strrchr(type_str, '.');
+
+ printf("%-30s%-20s%s\n",
istr(tree_ident(d)),
- type_pp(tree_type(d)),
+ (short_name != NULL ? short_name + 1 : type_str),
pprint(d, reply->values, msg.len));
free(reply);

0 comments on commit 12dbd4d

Please sign in to comment.
Something went wrong with that request. Please try again.