1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 21:36:37 +02:00

script: evaluate content of option script.scripts.dir (issue #388)

This commit is contained in:
Sébastien Helleu
2015-06-19 21:12:47 +02:00
parent acb03201b4
commit 292830b5bf
20 changed files with 207 additions and 53 deletions
+1
View File
@@ -22,6 +22,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* core: add signal "signal_sighup"
* relay: display value of HTTP header "X-Real-IP" for websocket connections
(closes #440)
* script: evaluate content of option script.scripts.dir (issue #388)
=== Bugs fixed
+1 -1
View File
@@ -183,7 +183,7 @@
** Werte: -1 .. 525600 (Standardwert: `1440`)
* [[option_script.scripts.dir]] *script.scripts.dir*
** Beschreibung: `lokales Cache-Verzeichnis für Skripten`
** 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"`)
+1 -1
View File
@@ -183,7 +183,7 @@
** values: -1 .. 525600 (default value: `1440`)
* [[option_script.scripts.dir]] *script.scripts.dir*
** description: `local cache directory for scripts`
** 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"`)
+1 -1
View File
@@ -183,7 +183,7 @@
** valeurs: -1 .. 525600 (valeur par défaut: `1440`)
* [[option_script.scripts.dir]] *script.scripts.dir*
** description: `répertoire du cache local pour les scripts`
** 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"`)
+1 -1
View File
@@ -183,7 +183,7 @@
** valori: -1 .. 525600 (valore predefinito: `1440`)
* [[option_script.scripts.dir]] *script.scripts.dir*
** descrizione: `directory locale della cache per gli script`
** 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"`)
+1 -1
View File
@@ -183,7 +183,7 @@
** 値: -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"`)
+1 -1
View File
@@ -183,7 +183,7 @@
** wartości: -1 .. 525600 (domyślna wartość: `1440`)
* [[option_script.scripts.dir]] *script.scripts.dir*
** opis: `lokalny katalog dla skryptów`
** 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"`)
+15 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10129,8 +10129,15 @@ msgid ""
"expire)"
msgstr ""
msgid "local cache directory for scripts"
#, fuzzy
msgid ""
"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)"
msgstr ""
"cesta pro logovací soubory WeeChat; \"%h\" na záčátku řetězce je nahrazeno "
"domácím adresářem WeeChat (\"~/.weechat\" je výchozí); jsou povoleny "
"specifikátory data (viz. man strftime)"
msgid ""
"scripts to \"hold\": comma-separated list of scripts which will never been "
@@ -11047,3 +11054,9 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nemohu se připojit k odesílateli"
#, fuzzy
#~ msgid ""
#~ "local cache directory for scripts (note: content is evaluated, see /help "
#~ "eval)"
#~ msgstr "příkaz spuštěný při startu WeeChat, před načtením pluginů"
+21 -3
View File
@@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-06-13 22:57+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <>\n"
@@ -11503,8 +11503,15 @@ msgstr ""
"Ablaufdatum des lokalen Caches, in Minuten (-1 = ohne Ablaufdatum, 0 = "
"umgehend)"
msgid "local cache directory for scripts"
msgstr "lokales Cache-Verzeichnis für Skripten"
#, fuzzy
msgid ""
"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)"
msgstr ""
"Pfad für WeeChat Protokolldateien; \"%h\" wird durch das WeeChat Verzeichnis "
"ersetzt (Standardpfad: \"~/.weechat\"); eine Datumsspezifikation ist "
"zulässig (siehe: man strftime)"
msgid ""
"scripts to \"hold\": comma-separated list of scripts which will never been "
@@ -12556,3 +12563,14 @@ msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr ""
"%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)"
#, fuzzy
#~ msgid ""
#~ "local cache directory for scripts (note: content is evaluated, see /help "
#~ "eval)"
#~ msgstr ""
#~ "Realname der auf dem Server genutzt werden soll (Hinweis: Inhalt wird "
#~ "evaluiert, siehe /help eval)"
#~ msgid "local cache directory for scripts"
#~ msgstr "lokales Cache-Verzeichnis für Skripten"
+16 -2
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10415,8 +10415,15 @@ msgid ""
"expire)"
msgstr ""
msgid "local cache directory for scripts"
#, fuzzy
msgid ""
"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)"
msgstr ""
"ruta para los registros de WeeChat; \"%h\" al principio de la cadena será "
"reemplazado por el directorio raíz de WeeChat (\"~/.weechat\" por defecto); "
"especificadores de fecha son permitidos (ver man strftime)"
msgid ""
"scripts to \"hold\": comma-separated list of scripts which will never been "
@@ -11339,3 +11346,10 @@ msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: no es posible conectarse al transmisor"
#, fuzzy
#~ msgid ""
#~ "local cache directory for scripts (note: content is evaluated, see /help "
#~ "eval)"
#~ msgstr ""
#~ "comando ejecutado cuando WeeChat inicia, antes de cargar los plugins"
+20 -4
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"PO-Revision-Date: 2015-06-13 07:41+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-06-19 21:07+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -11239,8 +11239,14 @@ msgstr ""
"temps d'expiration du cache local, en minutes (-1 = n'expire jamais, 0 = "
"expire toujours)"
msgid "local cache directory for scripts"
msgstr "répertoire du cache local pour les scripts"
msgid ""
"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)"
msgstr ""
"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)"
msgid ""
"scripts to \"hold\": comma-separated list of scripts which will never been "
@@ -12292,3 +12298,13 @@ msgstr "%s%s : délai d'attente dépassé pour \"%s\" avec %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s : impossible de se connecter : erreur inattendue (%d)"
#~ msgid ""
#~ "local cache directory for scripts (note: content is evaluated, see /help "
#~ "eval)"
#~ msgstr ""
#~ "répertoire du cache local pour les scripts (note : le contenu est évalué, "
#~ "voir /help eval)"
#~ msgid "local cache directory for scripts"
#~ msgstr "répertoire du cache local pour les scripts"
+8 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9487,8 +9487,14 @@ msgid ""
"expire)"
msgstr ""
msgid "local cache directory for scripts"
#, fuzzy
msgid ""
"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)"
msgstr ""
"modulok elérési útvonala ('%h' helyére automatikusan a WeeChat saját "
"könyvtára, alapértelmezésben ~/.weechat, kerül)"
msgid ""
"scripts to \"hold\": comma-separated list of scripts which will never been "
+21 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10599,8 +10599,15 @@ msgid ""
"expire)"
msgstr ""
msgid "local cache directory for scripts"
msgstr "directory locale della cache per gli script"
#, fuzzy
msgid ""
"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)"
msgstr ""
"path per i file di log di WeeChat: \"%h\" all'inizio della stringa viene "
"sostituito dalla directory home di WeeChat (predefinita è \"~/.weechat); "
"sono ammessi gli specificatori di data (consultare man strftime)"
msgid ""
"scripts to \"hold\": comma-separated list of scripts which will never been "
@@ -11518,3 +11525,14 @@ msgstr "%s%s: timeout per \"%s\" con %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: impossibile connettersi al mittente"
#, fuzzy
#~ msgid ""
#~ "local cache directory for scripts (note: content is evaluated, see /help "
#~ "eval)"
#~ msgstr ""
#~ "nome utente per il server proxy (nota: il contenuto viene valutato, "
#~ "consultare /help eval)"
#~ msgid "local cache directory for scripts"
#~ msgstr "directory locale della cache per gli script"
+20 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-06-09 22:28+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n"
@@ -10813,8 +10813,14 @@ msgstr ""
"ローカルキャッシュが無効になる時間、分単位 (-1 = 再取得しない、0 = 常に再取"
"得)"
msgid "local cache directory for scripts"
msgstr "スクリプトのローカルキャッシュディレクトリ"
#, fuzzy
msgid ""
"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)"
msgstr ""
"WeeChat ログファイルのパス; 文字列最初の \"%h\" は WeeChat ホーム (デフォルト"
"では \"~/.weechat\") に置換; 日付指定子を使える (strftime の man を参照)"
msgid ""
"scripts to \"hold\": comma-separated list of scripts which will never been "
@@ -11814,3 +11820,14 @@ msgstr "%s%s: \"%s\" のタイムアウト %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: 接続できません: 未定義のエラー (%d)"
#, fuzzy
#~ msgid ""
#~ "local cache directory for scripts (note: content is evaluated, see /help "
#~ "eval)"
#~ msgstr ""
#~ "サーバで使用する実名 (注意: 値は評価されます、/help eval を参照してくださ"
#~ "い)"
#~ msgid "local cache directory for scripts"
#~ msgstr "スクリプトのローカルキャッシュディレクトリ"
+23 -5
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-05-09 14:00+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -213,8 +213,8 @@ msgstr ""
"Wszystkie dokumenty dotyczące WeeChat dostępne są pod adresem: https://"
"weechat.org/doc\n"
"\n"
"Ponadto, dostępna jest wbudowana pomoc (komenda /help) dla wszystkich "
"komend i opcji (klawisz Tab dopełnia nazwy).\n"
"Ponadto, dostępna jest wbudowana pomoc (komenda /help) dla wszystkich komend "
"i opcji (klawisz Tab dopełnia nazwy).\n"
"Komenda /iset (skrypt iset.pl) pomaga w dostosowaniu WeeChat do swoich "
"preferencji: /script install iset.pl\n"
"\n"
@@ -11019,8 +11019,15 @@ msgstr ""
"lokalnie zapisany czas wygaśnięcia, w minutach (-1 = nigdy nie wygasa, 0 = "
"zawsze wygasa)"
msgid "local cache directory for scripts"
msgstr "lokalny katalog dla skryptów"
#, fuzzy
msgid ""
"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)"
msgstr ""
"ścieżka do plików z logami WeeChat; \"%h\" na początku ciągu zostanie "
"zastąpione przez katalog domowy WeeChat (domyślnie \"~/.weechat\"); "
"określenia dla daty są dozwolone (zobacz man strftime)"
msgid ""
"scripts to \"hold\": comma-separated list of scripts which will never been "
@@ -12038,3 +12045,14 @@ msgstr "%s%s: przekroczono czas na \"%s\" z %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nie można połączyć: niespodziewany błąd (%d)"
#, fuzzy
#~ msgid ""
#~ "local cache directory for scripts (note: content is evaluated, see /help "
#~ "eval)"
#~ msgstr ""
#~ "prawdziwa nazwa do użycia na serwerze (uwaga: zawartość jest "
#~ "przetwarzana, zobacz /help eval)"
#~ msgid "local cache directory for scripts"
#~ msgstr "lokalny katalog dla skryptów"
+17 -2
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9905,8 +9905,15 @@ msgid ""
"expire)"
msgstr ""
msgid "local cache directory for scripts"
#, fuzzy
msgid ""
"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)"
msgstr ""
"diretório para arquivos de registro do WeeChat; \"%h\" no início da string "
"será substituído pelo diretório do WeeChat (\"~/.weechat\" por padrão); "
"especificadores de data são permitidos (veja \"man strftime\")"
msgid ""
"scripts to \"hold\": comma-separated list of scripts which will never been "
@@ -10825,3 +10832,11 @@ msgstr "%s%s: tempo esgotado para \"%s\" com %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: não foi possível conectar ao remetente"
#, fuzzy
#~ msgid ""
#~ "local cache directory for scripts (note: content is evaluated, see /help "
#~ "eval)"
#~ msgstr ""
#~ "comando executado quando o WeeChat inicia, antes do carregamento dos "
#~ "plugins (nota: conteúdo é avaliado, veja /help eval)"
+8 -2
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9514,8 +9514,14 @@ msgid ""
"expire)"
msgstr ""
msgid "local cache directory for scripts"
#, fuzzy
msgid ""
"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)"
msgstr ""
"путь поиска pluginов ('%h' заменяется на домашний каталог WeeChat, по "
"умолчанию - ~/.weechat)"
msgid ""
"scripts to \"hold\": comma-separated list of scripts which will never been "
+5 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2015-03-10 21:33+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8583,7 +8583,10 @@ msgid ""
"expire)"
msgstr ""
msgid "local cache directory for scripts"
msgid ""
"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)"
msgstr ""
msgid ""
+5 -2
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2015-06-13 07:39+0200\n"
"POT-Creation-Date: 2015-06-19 21:06+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8512,7 +8512,10 @@ msgid ""
"expire)"
msgstr ""
msgid "local cache directory for scripts"
msgid ""
"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)"
msgstr ""
msgid ""
+21 -15
View File
@@ -152,26 +152,30 @@ char *
script_config_get_dir ()
{
const char *weechat_home;
char *path, *path2;
char *path, *path2, *path3;
weechat_home = weechat_info_get ("weechat_dir", NULL);
path = NULL;
path2 = NULL;
path3 = NULL;
path = weechat_string_expand_home (weechat_config_string (script_config_scripts_dir));
path2 = weechat_string_replace ((path) ?
path : weechat_config_string (script_config_scripts_dir),
"%h", weechat_home);
if (path && path2)
path = weechat_string_eval_expression (
weechat_config_string (script_config_scripts_dir), NULL, NULL, NULL);
if (path)
{
free (path);
path = NULL;
path2 = weechat_string_expand_home (path);
if (path2)
{
weechat_home = weechat_info_get ("weechat_dir", NULL);
path3 = weechat_string_replace (path2, "%h", weechat_home);
}
}
if (path2)
return path2;
if (path)
return path;
return strdup (weechat_config_string (script_config_scripts_dir));
free (path);
if (path2)
free (path2);
return path3;
}
/*
@@ -689,7 +693,9 @@ script_config_init ()
script_config_scripts_dir = weechat_config_new_option (
script_config_file, ptr_section,
"dir", "string",
N_("local cache directory for scripts"),
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)"),
NULL, 0, 0, "%h/script", NULL, 0, NULL, NULL,
NULL, NULL, NULL, NULL);
script_config_scripts_hold = weechat_config_new_option (