diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-02-14 20:45:12 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-02-14 20:45:12 +0100 |
commit | 01153cd4785945013586b04f52469850f3d4344a (patch) | |
tree | ca8b531c4ada6ccbcaf0a55f74b7aff36eb1d524 /src/core | |
parent | eed0878231641ee374d519707dd467c184608a42 (diff) | |
download | weechat-01153cd4785945013586b04f52469850f3d4344a.zip |
core: add option "dirs" for command /debug
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-command.c | 6 | ||||
-rw-r--r-- | src/core/wee-debug.c | 16 | ||||
-rw-r--r-- | src/core/wee-debug.h | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 30162f288..6576fe446 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -1414,6 +1414,10 @@ COMMAND_CALLBACK(debug) { debug_windows_tree (); } + else if (string_strcasecmp (argv[1], "dirs") == 0) + { + debug_directories (); + } else if (string_strcasecmp (argv[1], "set") == 0) { COMMAND_MIN_ARGS(4, "debug set"); @@ -5943,6 +5947,7 @@ command_init () "in log file\n" " color: display infos about current color pairs\n" " cursor: toggle debug for cursor mode\n" + " dirs: display directories\n" " hdata: display infos about hdata (with free: remove " "all hdata in memory)\n" " hooks: display infos about hooks\n" @@ -5958,6 +5963,7 @@ command_init () " || buffer" " || color" " || cursor verbose" + " || dirs" " || hdata free" " || hooks" " || infolists" diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c index 53ac771a9..33e0c7722 100644 --- a/src/core/wee-debug.c +++ b/src/core/wee-debug.c @@ -540,6 +540,22 @@ debug_infolists () } /* + * Displays WeeChat directories. + */ + +void +debug_directories () +{ + gui_chat_printf (NULL, ""); + gui_chat_printf (NULL, _("Directories:")); + gui_chat_printf (NULL, " home : %s (%s: %s)", + weechat_home, _("default"), WEECHAT_HOME); + gui_chat_printf (NULL, " lib : %s", WEECHAT_LIBDIR); + gui_chat_printf (NULL, " share : %s", WEECHAT_SHAREDIR); + gui_chat_printf (NULL, " locale: %s", LOCALEDIR); +} + +/* * Hooks signals for debug. */ diff --git a/src/core/wee-debug.h b/src/core/wee-debug.h index 9efa10f75..f21bbc7c8 100644 --- a/src/core/wee-debug.h +++ b/src/core/wee-debug.h @@ -28,6 +28,7 @@ extern void debug_memory (); extern void debug_hdata (); extern void debug_hooks (); extern void debug_infolists (); +extern void debug_directories (); extern void debug_init (); #endif /* __WEECHAT_DEBUG_H */ |