Remove scheme and filetype matching for url (save|open)

This commit is contained in:
William Wennerström
2020-12-08 20:01:17 +01:00
parent 7f0165a912
commit d7848e38bc
5 changed files with 91 additions and 69 deletions

View File

@@ -2374,7 +2374,7 @@ static struct cmd_t command_defs[] = {
"Settings for consistent color generation for nicks (XEP-0392). Including corrections for Color Vision Deficiencies. "
"Your terminal needs to support 256 colors.")
CMD_ARGS(
{ "on|off|redgreen|blue", "Enable or disable nick colorization for MUC nicks. 'redgreen' is for people with red/green blindess and 'blue' for people with blue blindness." },
{ "on|off|redgreen|blue", "Enable or disable nick colorization for MUC nicks. 'redgreen' is for people with red/green blindness and 'blue' for people with blue blindness." },
{ "own on|off", "Enable color generation for own nick. If disabled the color from the color from the theme ('me') will get used." })
CMD_EXAMPLES(
"/color off",
@@ -2493,26 +2493,35 @@ static struct cmd_t command_defs[] = {
{ "/executable",
parse_args, 2, 4, &cons_executable_setting,
CMD_NOSUBFUNCS
CMD_MAINFUNC(cmd_executable)
CMD_SUBFUNCS(
{ "avatar", cmd_executable_avatar },
{ "urlopen", cmd_executable_urlopen },
{ "urlsave", cmd_executable_urlsave })
CMD_NOMAINFUNC
CMD_TAGS(
CMD_TAG_DISCOVERY)
CMD_SYN(
"/executable avatar <cmd>",
"/executable urlopen (<fileType>|DEF <require_save> <cmd>",
"/executable urlsave (<protocol>|DEF) <cmd>")
"/executable urlopen set <cmdtemplate>",
"/executable urlopen default",
"/executable urlsave set <cmdtemplate>",
"/executable urlsave default")
CMD_DESC(
"Configure executable that should be called upon a certain command."
"Default is xdg-open.")
"Configure executable that should be called upon a certain command.")
CMD_ARGS(
{ "avatar", "Set executable that is run in /avatar open. Use your favourite image viewer." },
{ "urlopen", "Set executable that is run in /url open for a given file type. It may be your favorite browser or a specific viewer. Use DEF to set default command for undefined file type." },
{ "urlsave", "Set executable that is run in /url save for a given protocol. Use your favourite downloader. Use DEF to set default command for undefined protocol." })
{ "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 default", "Restore to default settings." },
{ "urlsave set", "Set executable that is run by /url save. It may be your favorite downloader.'" },
{ "urlsave default", "Use the built-in download method for saving." })
CMD_EXAMPLES(
"/executable avatar xdg-open",
"/executable urlopen DEF false \"xdg-open %u\"",
"/executable urlopen html false \"firefox %u\"",
"/executable urlsave aesgcm \"omut -d -o %p %u\"")
"/executable urlopen set \"xdg-open %u\"",
"/executable urlopen set \"firefox %u\"",
"/executable urlopen default",
"/executable urlsave set \"wget %u -O %p\"",
"/executable urlsave set \"curl %u -o %p\"",
"/executable urlsave default")
},
{ "/url",