diff options
author | James Booth <boothj5@gmail.com> | 2014-01-25 00:50:07 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-01-25 00:50:07 +0000 |
commit | cb590dd82cdc6d60c61a4296a3cf83813b28ece9 (patch) | |
tree | 3a87cde63e9d5f0991a8b944f51d636d4eeddeb5 | |
parent | 5d85974bc0d56cdcd3c1a84040a26bdcc7f17325 (diff) | |
download | profani-tty-cb590dd82cdc6d60c61a4296a3cf83813b28ece9.tar.gz |
Added help for /alias command
-rw-r--r-- | src/command/command.c | 7 | ||||
-rw-r--r-- | tests/config/helpers.c | 10 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/command/command.c b/src/command/command.c index 1ef27e21..a65084ce 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -552,6 +552,13 @@ static struct cmd_t command_defs[] = { "/alias add|remove|list [name value]", "-----------------------------------", "Add, remove or show command aliases.", + "The alias will be available as a command", + "Example : /alias add friends /who online friends", + "Example : /alias add q /quit", + "Example : /alias a /away \"I'm in a meeting.\"", + "Example : /alias remove q", + "Example : /alias list", + "The above aliases will be available as /friends and /a", NULL } } }, { "/chlog", diff --git a/tests/config/helpers.c b/tests/config/helpers.c index 9068546a..744c48e4 100644 --- a/tests/config/helpers.c +++ b/tests/config/helpers.c @@ -23,11 +23,11 @@ void create_config_file(void **state) } g_string_free(profanity_dir, TRUE); - fopen("./tests/files/xdg_config_home/profanity/profrc", "ab+"); - - g_free(xdg_config); - - prefs_load(); + FILE *f = fopen("./tests/files/xdg_config_home/profanity/profrc", "ab+"); + if (f) { + g_free(xdg_config); + prefs_load(); + } } void delete_config_file(void **state) |