diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-06-24 07:54:42 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-06-24 07:54:42 +0200 |
commit | 2bd2d74a0720f02d9e5587331659c4d1bbd4e97f (patch) | |
tree | c3c448fbfa5b7dd235c76eb7b235a5fc06ef2dbb /doc/it/weechat_plugin_api.it.asciidoc | |
parent | 6668b9869bd8c02196e51776d44465ccfce4a9bc (diff) | |
download | weechat-2bd2d74a0720f02d9e5587331659c4d1bbd4e97f.zip |
api: add function string_eval_path_home()
Diffstat (limited to 'doc/it/weechat_plugin_api.it.asciidoc')
-rw-r--r-- | doc/it/weechat_plugin_api.it.asciidoc | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/doc/it/weechat_plugin_api.it.asciidoc b/doc/it/weechat_plugin_api.it.asciidoc index a7e792034..0acfa2424 100644 --- a/doc/it/weechat_plugin_api.it.asciidoc +++ b/doc/it/weechat_plugin_api.it.asciidoc @@ -955,6 +955,67 @@ free (str); [NOTE] Questa funzione non è disponibile nelle API per lo scripting. +==== string_eval_path_home + +_WeeChat ≥ 1.3._ + +// TRANSLATION MISSING +Evaluate a path in 3 steps: + +. replace leading `%h` by WeeChat home directory, +. replace leading `~` by user home directory (call to + <<_string_expand_home,weechat_string_expand_home>>), +. evaluate variables + (see <<_string_eval_expression,weechat_string_eval_expression>>). + +Prototipo: + +[source,C] +---- +char *weechat_string_eval_path_home (const char *path, + struct t_hashtable *pointers, + struct t_hashtable *extra_vars, + struct t_hashtable *options); +---- + +// TRANSLATION MISSING +Argomenti: + +* 'path': path +* 'pointers': hashtable for call to function + <<_string_eval_expression,weechat_string_eval_expression>> +* 'extra_vars': hashtable for call to function + <<_string_eval_expression,weechat_string_eval_expression>> +* 'options': hashtable for call to function + <<_string_eval_expression,weechat_string_eval_expression>> + +// TRANSLATION MISSING +Valore restituito: + +* evaluated path (must be freed by calling "free" after use) + +Esempio in C: + +[source,C] +---- +char *str = weechat_string_expand_home ("%h/test/file.txt"); +/* result: "/home/xxx/.weechat/test/file.txt" */ +/* ... */ +free (str); +---- + +Script (Python): + +[source,python] +---- +# prototipo +path = weechat.string_eval_path_home(path, pointers, extra_vars, options) + +# esempio +path = weechat.string_eval_path_home("%h/test/file.txt", "", "", "") +# path == "/home/xxx/.weechat/test/file.txt" +---- + ==== string_remove_quotes Rimuove le virgolette all'inizio e alla fine della stringa (ignora gli |