summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-06-21 07:40:18 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-06-21 07:40:18 +0200
commit07cbc3bd2e7240f9da1cf9f496823c82a2187aed (patch)
treeac4beb7477728594f7b739745c5d0f72aa6d2323
parent33a4b4b1fc0577bcbf88d6b2c80f003a92dc55ab (diff)
downloadweechat-07cbc3bd2e7240f9da1cf9f496823c82a2187aed.zip
script: rename option script.scripts.dir to script.scripts.path (issue #388)
-rw-r--r--ChangeLog.asciidoc3
-rw-r--r--ReleaseNotes.asciidoc7
-rw-r--r--doc/de/autogen/user/script_options.asciidoc10
-rw-r--r--doc/en/autogen/user/script_options.asciidoc10
-rw-r--r--doc/fr/autogen/user/script_options.asciidoc10
-rw-r--r--doc/it/autogen/user/script_options.asciidoc10
-rw-r--r--doc/ja/autogen/user/script_options.asciidoc10
-rw-r--r--doc/pl/autogen/user/script_options.asciidoc10
-rw-r--r--src/plugins/script/script-config.c14
-rw-r--r--src/plugins/script/script-config.h3
10 files changed, 47 insertions, 40 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc
index 726be9270..49978e92c 100644
--- a/ChangeLog.asciidoc
+++ b/ChangeLog.asciidoc
@@ -23,7 +23,8 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* logger: evaluate content of option logger.file.path (issue #388)
* relay: display value of HTTP header "X-Real-IP" for websocket connections
(closes #440)
-* script: evaluate content of option script.scripts.dir (issue #388)
+* script: rename option script.scripts.dir to script.scripts.path, evaluate
+ content of option (issue #388)
=== Bugs fixed
diff --git a/ReleaseNotes.asciidoc b/ReleaseNotes.asciidoc
index 80414dcc9..7cbb18d38 100644
--- a/ReleaseNotes.asciidoc
+++ b/ReleaseNotes.asciidoc
@@ -17,6 +17,13 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
(file 'ChangeLog.asciidoc' in sources).
+== Version 1.3 (under dev)
+
+=== Script path
+
+The option 'script.scripts.dir' has been renamed to 'script.scripts.path'
+(and the content is now evaluated, see `/help eval`).
+
== Version 1.2 (2015-05-10)
The word chars are now customizable with two options:
diff --git a/doc/de/autogen/user/script_options.asciidoc b/doc/de/autogen/user/script_options.asciidoc
index 5b10f9b0b..2bad36761 100644
--- a/doc/de/autogen/user/script_options.asciidoc
+++ b/doc/de/autogen/user/script_options.asciidoc
@@ -182,16 +182,16 @@
** Typ: integer
** Werte: -1 .. 525600 (Standardwert: `1440`)
-* [[option_script.scripts.dir]] *script.scripts.dir*
-** Beschreibung: `local cache directory for scripts; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default) (note: content is evaluated, see /help eval)`
-** Typ: Zeichenkette
-** Werte: beliebige Zeichenkette (Standardwert: `"%h/script"`)
-
* [[option_script.scripts.hold]] *script.scripts.hold*
** Beschreibung: `Skripten welche "gehalten" werden sollen. Dies ist eine durch Kommata getrennte Liste von Skripten die weder aktualisiert noch entfernt werden können. Zum Beispiel: "buffers.pl,iset.pl"`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `""`)
+* [[option_script.scripts.path]] *script.scripts.path*
+** Beschreibung: `local cache directory for scripts; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default) (note: content is evaluated, see /help eval)`
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette (Standardwert: `"%h/script"`)
+
* [[option_script.scripts.url]] *script.scripts.url*
** Beschreibung: `URL mit dem Dateinamen, welches die Liste der Skripten enthält; standardmäßig wird HTTPS genutzt, siehe Option script.scripts.url_force_https`
** Typ: Zeichenkette
diff --git a/doc/en/autogen/user/script_options.asciidoc b/doc/en/autogen/user/script_options.asciidoc
index d2d925142..c96d20b99 100644
--- a/doc/en/autogen/user/script_options.asciidoc
+++ b/doc/en/autogen/user/script_options.asciidoc
@@ -182,16 +182,16 @@
** type: integer
** values: -1 .. 525600 (default value: `1440`)
-* [[option_script.scripts.dir]] *script.scripts.dir*
-** description: `local cache directory for scripts; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default) (note: content is evaluated, see /help eval)`
-** type: string
-** values: any string (default value: `"%h/script"`)
-
* [[option_script.scripts.hold]] *script.scripts.hold*
** description: `scripts to "hold": comma-separated list of scripts which will never been upgraded and can not be removed, for example: "buffers.pl,iset.pl"`
** type: string
** values: any string (default value: `""`)
+* [[option_script.scripts.path]] *script.scripts.path*
+** description: `local cache directory for scripts; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default) (note: content is evaluated, see /help eval)`
+** type: string
+** values: any string (default value: `"%h/script"`)
+
* [[option_script.scripts.url]] *script.scripts.url*
** description: `URL for file with list of scripts; by default HTTPS is forced, see option script.scripts.url_force_https`
** type: string
diff --git a/doc/fr/autogen/user/script_options.asciidoc b/doc/fr/autogen/user/script_options.asciidoc
index 0d3efbeb0..b15305150 100644
--- a/doc/fr/autogen/user/script_options.asciidoc
+++ b/doc/fr/autogen/user/script_options.asciidoc
@@ -182,16 +182,16 @@
** type: entier
** valeurs: -1 .. 525600 (valeur par défaut: `1440`)
-* [[option_script.scripts.dir]] *script.scripts.dir*
-** description: `répertoire du cache local pour les scripts ; "%h" au début de la chaîne est remplacé par le répertoire de base WeeChat (par défaut : "~/.weechat") (note : le contenu est évalué, voir /help eval)`
-** type: chaîne
-** valeurs: toute chaîne (valeur par défaut: `"%h/script"`)
-
* [[option_script.scripts.hold]] *script.scripts.hold*
** description: `scripts à "figer" : liste de scripts séparés par des virgules qui ne seront jamais mis à jour et ne peuvent pas être supprimés, par exemple : "buffers.pl,iset.pl"`
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `""`)
+* [[option_script.scripts.path]] *script.scripts.path*
+** description: `répertoire du cache local pour les scripts ; "%h" au début de la chaîne est remplacé par le répertoire de base WeeChat (par défaut : "~/.weechat") (note : le contenu est évalué, voir /help eval)`
+** type: chaîne
+** valeurs: toute chaîne (valeur par défaut: `"%h/script"`)
+
* [[option_script.scripts.url]] *script.scripts.url*
** description: `URL pour le fichier avec la liste des scripts ; par défaut HTTPS est forcé, voir l'option script.scripts.url_force_https`
** type: chaîne
diff --git a/doc/it/autogen/user/script_options.asciidoc b/doc/it/autogen/user/script_options.asciidoc
index f5e8d9889..cfa2ec945 100644
--- a/doc/it/autogen/user/script_options.asciidoc
+++ b/doc/it/autogen/user/script_options.asciidoc
@@ -182,16 +182,16 @@
** tipo: intero
** valori: -1 .. 525600 (valore predefinito: `1440`)
-* [[option_script.scripts.dir]] *script.scripts.dir*
-** descrizione: `local cache directory for scripts; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default) (note: content is evaluated, see /help eval)`
-** tipo: stringa
-** valori: qualsiasi stringa (valore predefinito: `"%h/script"`)
-
* [[option_script.scripts.hold]] *script.scripts.hold*
** descrizione: `scripts to "hold": comma-separated list of scripts which will never been upgraded and can not be removed, for example: "buffers.pl,iset.pl"`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `""`)
+* [[option_script.scripts.path]] *script.scripts.path*
+** descrizione: `local cache directory for scripts; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default) (note: content is evaluated, see /help eval)`
+** tipo: stringa
+** valori: qualsiasi stringa (valore predefinito: `"%h/script"`)
+
* [[option_script.scripts.url]] *script.scripts.url*
** descrizione: `URL for file with list of scripts; by default HTTPS is forced, see option script.scripts.url_force_https`
** tipo: stringa
diff --git a/doc/ja/autogen/user/script_options.asciidoc b/doc/ja/autogen/user/script_options.asciidoc
index 57d1f632b..88db8a7de 100644
--- a/doc/ja/autogen/user/script_options.asciidoc
+++ b/doc/ja/autogen/user/script_options.asciidoc
@@ -182,16 +182,16 @@
** タイプ: 整数
** 値: -1 .. 525600 (デフォルト値: `1440`)
-* [[option_script.scripts.dir]] *script.scripts.dir*
-** 説明: `local cache directory for scripts; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default) (note: content is evaluated, see /help eval)`
-** タイプ: 文字列
-** 値: 未制約文字列 (デフォルト値: `"%h/script"`)
-
* [[option_script.scripts.hold]] *script.scripts.hold*
** 説明: `"ホールド" するスクリプト: コンマ区切りのスクリプトリスト、このリストに含まれるスクリプトはアップグレードされませんし、削除もされません、例: "buffers.pl,iset.pl"`
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `""`)
+* [[option_script.scripts.path]] *script.scripts.path*
+** 説明: `local cache directory for scripts; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default) (note: content is evaluated, see /help eval)`
+** タイプ: 文字列
+** 値: 未制約文字列 (デフォルト値: `"%h/script"`)
+
* [[option_script.scripts.url]] *script.scripts.url*
** 説明: `スクリプトのリストを含むファイルの URL; デフォルトは強制的に HTTPS を使用、オプション script.scripts.url_force_https を参照`
** タイプ: 文字列
diff --git a/doc/pl/autogen/user/script_options.asciidoc b/doc/pl/autogen/user/script_options.asciidoc
index 444bd3ab5..7cc61baa0 100644
--- a/doc/pl/autogen/user/script_options.asciidoc
+++ b/doc/pl/autogen/user/script_options.asciidoc
@@ -182,16 +182,16 @@
** typ: liczba
** wartości: -1 .. 525600 (domyślna wartość: `1440`)
-* [[option_script.scripts.dir]] *script.scripts.dir*
-** opis: `local cache directory for scripts; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default) (note: content is evaluated, see /help eval)`
-** typ: ciąg
-** wartości: dowolny ciąg (domyślna wartość: `"%h/script"`)
-
* [[option_script.scripts.hold]] *script.scripts.hold*
** opis: `skrypty do "wstrzymania": oddzielona przecinkami lista skryptów, które nigdy nie zostaną zaktualizowane i nie mogą być usunięte, na przykład: "buffers.pl,iset.pl"`
** typ: ciąg
** wartości: dowolny ciąg (domyślna wartość: `""`)
+* [[option_script.scripts.path]] *script.scripts.path*
+** opis: `local cache directory for scripts; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default) (note: content is evaluated, see /help eval)`
+** typ: ciąg
+** wartości: dowolny ciąg (domyślna wartość: `"%h/script"`)
+
* [[option_script.scripts.url]] *script.scripts.url*
** opis: `adres pliku z listą skryptów; domyśłnie wymuszany jest protokół HTTPS, zobacz opcje script.scripts.url_force_https`
** typ: ciąg
diff --git a/src/plugins/script/script-config.c b/src/plugins/script/script-config.c
index 59983a8ce..be836f2ce 100644
--- a/src/plugins/script/script-config.c
+++ b/src/plugins/script/script-config.c
@@ -82,7 +82,7 @@ struct t_config_option *script_config_color_text_version_selected;
struct t_config_option *script_config_scripts_autoload;
struct t_config_option *script_config_scripts_cache_expire;
-struct t_config_option *script_config_scripts_dir;
+struct t_config_option *script_config_scripts_path;
struct t_config_option *script_config_scripts_hold;
struct t_config_option *script_config_scripts_url;
struct t_config_option *script_config_scripts_url_force_https;
@@ -149,7 +149,7 @@ script_config_get_diff_command ()
*/
char *
-script_config_get_dir ()
+script_config_get_path ()
{
const char *weechat_home;
char *path, *path2, *path3;
@@ -159,7 +159,7 @@ script_config_get_dir ()
path3 = NULL;
path = weechat_string_eval_expression (
- weechat_config_string (script_config_scripts_dir), NULL, NULL, NULL);
+ weechat_config_string (script_config_scripts_path), NULL, NULL, NULL);
if (path)
{
path2 = weechat_string_expand_home (path);
@@ -191,7 +191,7 @@ script_config_get_xml_filename ()
char *path, *filename;
int length;
- path = script_config_get_dir ();
+ path = script_config_get_path ();
length = strlen (path) + 64;
filename = malloc (length);
if (filename)
@@ -217,7 +217,7 @@ script_config_get_script_download_filename (struct t_script_repo *script,
char *path, *filename;
int length;
- path = script_config_get_dir ();
+ path = script_config_get_path ();
length = strlen (path) + 1 + strlen (script->name_with_extension)
+ ((suffix) ? strlen (suffix) : 0) + 1;
filename = malloc (length);
@@ -690,9 +690,9 @@ script_config_init ()
"0 = always expire)"),
NULL, -1, 525600, "1440", NULL, 0, NULL, NULL,
NULL, NULL, NULL, NULL);
- script_config_scripts_dir = weechat_config_new_option (
+ script_config_scripts_path = weechat_config_new_option (
script_config_file, ptr_section,
- "dir", "string",
+ "path", "string",
N_("local cache directory for scripts; \"%h\" at beginning of string "
"is replaced by WeeChat home (\"~/.weechat\" by default) "
"(note: content is evaluated, see /help eval)"),
diff --git a/src/plugins/script/script-config.h b/src/plugins/script/script-config.h
index 5d2a69660..6f488bda5 100644
--- a/src/plugins/script/script-config.h
+++ b/src/plugins/script/script-config.h
@@ -62,13 +62,12 @@ extern struct t_config_option *script_config_color_text_version_selected;
extern struct t_config_option *script_config_scripts_autoload;
extern struct t_config_option *script_config_scripts_cache_expire;
-extern struct t_config_option *script_config_scripts_dir;
+extern struct t_config_option *script_config_scripts_path;
extern struct t_config_option *script_config_scripts_hold;
extern struct t_config_option *script_config_scripts_url;
extern struct t_config_option *script_config_scripts_url_force_https;
extern const char *script_config_get_diff_command ();
-extern char *script_config_get_dir ();
extern char *script_config_get_xml_filename ();
extern char *script_config_get_script_download_filename (struct t_script_repo *script,
const char *suffix);