about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorWilliam Wennerström <william@wstrm.dev>2020-12-18 16:05:11 +0100
committerWilliam Wennerström <william@wstrm.dev>2020-12-18 16:05:11 +0100
commit01e8f01ed3faab41a25f2f05f6ea49c8464ea9ad (patch)
tree855a69848e4dab24ec57c1f252a49d3f8f2213b0 /src/command
parent8c94b9f2304c44b0640874b9026c860e9c98461d (diff)
downloadprofani-tty-01e8f01ed3faab41a25f2f05f6ea49c8464ea9ad.tar.gz
Add `/executable (urlsave|urlopen)` migrations
Diffstat (limited to 'src/command')
-rw-r--r--src/command/cmd_defs.c10
-rw-r--r--src/command/cmd_funcs.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c
index e876b647..94633f03 100644
--- a/src/command/cmd_defs.c
+++ b/src/command/cmd_defs.c
@@ -2510,9 +2510,9 @@ static struct cmd_t command_defs[] = {
               "Configure executable that should be called upon a certain command.")
       CMD_ARGS(
               { "avatar", "Set executable that is run by /avatar open. Use your favorite image viewer." },
-              { "urlopen set", "Set executable that is run by /url open. It may be your favorite browser or a specific viewer." },
+              { "urlopen set", "Set executable that is run by /url open. Takes a command template that replaces %u and %p with the URL and path respectively." },
               { "urlopen default", "Restore to default settings." },
-              { "urlsave set", "Set executable that is run by /url save. It may be your favorite downloader.'" },
+              { "urlsave set", "Set executable that is run by /url save. Takes a command template that replaces %u and %p with the URL and path respectively." },
               { "urlsave default", "Use the built-in download method for saving." })
       CMD_EXAMPLES(
               "/executable avatar xdg-open",
@@ -2853,9 +2853,9 @@ command_mangen(void)
     mkdir_recursive("docs");
 
     char* header = NULL;
-    GDateTime *now = g_date_time_new_now_local();
-    gchar *date = g_date_time_format(now, "%F");
-    if (asprintf(&header, ".TH man 1 \"%s\" \""PACKAGE_VERSION"\" \"Profanity XMPP client\"\n", date) == -1) {
+    GDateTime* now = g_date_time_new_now_local();
+    gchar* date = g_date_time_format(now, "%F");
+    if (asprintf(&header, ".TH man 1 \"%s\" \"" PACKAGE_VERSION "\" \"Profanity XMPP client\"\n", date) == -1) {
         // TODO: error
         return;
     }
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 9784f388..38b45a57 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -9263,8 +9263,8 @@ cmd_executable_urlopen(ProfWin* window, const char* const command, gchar** args)
         g_free(str);
 
     } else if (g_strcmp0(args[1], "default") == 0) {
-        prefs_set_string(PREF_URL_SAVE_CMD, NULL);
-        gchar* def = prefs_get_string(PREF_URL_SAVE_CMD);
+        prefs_set_string(PREF_URL_OPEN_CMD, NULL);
+        gchar* def = prefs_get_string(PREF_URL_OPEN_CMD);
         cons_show("`url open` command set to invoke %s (default)", def);
         g_free(def);
     } else {