api: add split of string and shell arguments in evaluation of expressions

Split of string: ${split:number,separators,flags,xxx}
Split of shell arguments: ${split_shell:number,xxx}
This commit is contained in:
Sébastien Helleu 2021-09-06 13:32:04 +02:00
parent 8852e9fd0c
commit 5b3929b321
32 changed files with 1725 additions and 603 deletions

View File

@ -23,6 +23,7 @@ New features::
* core: change key kbd:[Alt+h] to kbd:[Alt+h], kbd:[Alt+c] (clear hotlist)
* core: add options "hotlist_remove_buffer", "hotlist_restore_buffer" and "hotlist_restore_all" in command /input, add default keys kbd:[Alt+h], kbd:[Alt+m] (remove buffer), kbd:[Alt+h], kbd:[Alt+r] (restore hotlist in current buffer) and kbd:[Alt+h], kbd:[Alt+Shift+R] (restore hotlist in all buffers)
* core: add option "certs" in command /debug
* api: add split of string and shell arguments in evaluation of expressions with "split:number,seps,flags,xxx" and "split_shell:number,xxx"
* api: add `${re:repl_index}` to get the index of replacement in function string_eval_expression (issue #1689)
* api: add random integer number in evaluation of expressions with "random:min,max"
* api: add function string_cut

View File

@ -1337,83 +1337,85 @@ infolists: zeigt Information über die Infolists an
/eval [-n|-s] [-d] <expression>
[-n] [-d [-d]] -c <expression1> <operator> <expression2>
-n: gibt das Ergebnis aus, ohne dass dieses in den Buffer gesendet wird (debug Modus)
-s: teilt Ausdrücke, bevor sie evaluiert werden (mehrere Befehle können durch Semikolon getrennt werden)
-d: eine Debug-Ausgabe nach Auswertung anzeigen (Nutzung von zwei -d: ausführliche Debug-Ausgabe)
-c: Auswertung als Bedingung: nutzt Operatoren und runde Klammern, Rückgabewert als Boolean-Wert ("0" oder "1")
expression: Ausdruck welcher verarbeitet werden soll. Variablen im Format ${variable} werden ersetzt (siehe unten); mehrere Befehle werden durch ein Semikolon voneinander getrennt
operator: ein logischer oder vergleichender Operand:
- logische Operanden:
&& boolean "und"
|| boolean "oder"
- vergleichende Operanden:
== gleich
!= ungleich
<= kleiner oder gleich
< kleiner
>= größer oder gleich
> größer
=~ stimmt mit regulärem POSIX Ausdruck überein
!~ stimmt NICHT mit regulärem POSIX Ausdruck überein
==* stimmt mit Maske überein (Platzhalter "*" ist erlaubt)
!!* stimmt mit Maske NICHT überein (Platzhalter "*" ist erlaubt)
=* stimmt mit Maske überein, Groß- und Kleinschreibung wird nicht beachtet (Platzhalter "*" ist erlaubt)
!* stimmt mit Maske NICHT überein, Groß- und Kleinschreibung wird nicht beachtet (Platzhalter "*" ist erlaubt)
==- ist enthalten, Groß- und Kleinschreibung wird beachtet
!!- ist NICHT enthalten, Groß- und Kleinschreibung wird beachtet
=- ist enthalten, Groß- und Kleinschreibung wird nicht beachtet
!- ist NICHT enthalten, Groß- und Kleinschreibung wird nicht beachtet
-n: display result without sending it to buffer (debug mode)
-s: split expression before evaluating it (many commands can be separated by semicolons)
-d: display debug output after evaluation (with two -d: more verbose debug)
-c: evaluate as condition: use operators and parentheses, return a boolean value ("0" or "1")
expression: expression to evaluate, variables with format ${variable} are replaced (see below); many commands can be separated by semicolons
operator: a logical or comparison operator:
- logical operators:
&& boolean "and"
|| boolean "or"
- comparison operators:
== equal
!= not equal
<= less or equal
< less
>= greater or equal
> greater
=~ is matching POSIX extended regex
!~ is NOT matching POSIX extended regex
==* is matching mask, case sensitive (wildcard "*" is allowed)
!!* is NOT matching mask, case sensitive (wildcard "*" is allowed)
=* is matching mask, case insensitive (wildcard "*" is allowed)
!* is NOT matching mask, case insensitive (wildcard "*" is allowed)
==- is included, case sensitive
!!- is NOT included, case sensitive
=- is included, case insensitive
!- is NOT included, case insensitive
Ein Ausdruck gilt als "wahr" sofern das Ergebnis weder NULL, nicht leer und von "0" abweichend ist.
Für einen Vergleich werden Fließkommazahlen genutzt, insofern es sich bei beiden Ausdrücken um gültige Zahlen handelt, folgende Formate werden unterstützt:
- Integer (Beispiele: 5, -7)
- Fließkommazahl (Beispiele: 5.2, -7.5, 2.83e-2)
- hexadezimale Zahl (Beispiele: 0xA3, -0xA3)
Um einen Vergleich zwischen zwei Zeichenketten zu erzwingen, müssen die Ausdrücke in Anführungszeichen gesetzt werden, zum Beispiel:
An expression is considered as "true" if it is not NULL, not empty, and different from "0".
The comparison is made using floating point numbers if the two expressions are valid numbers, with one of the following formats:
- integer (examples: 5, -7)
- floating point number (examples: 5.2, -7.5, 2.83e-2)
- hexadecimal number (examples: 0xA3, -0xA3)
To force a string comparison, you can add double quotes around each expression, for example:
50 > 100 ==> 0
"50" > "100" ==> 1
Einige Variablen werden im Ausdruck mittels der Formatierung ${variable} ersetzt. Mögliche Variablen sind, nach Reihenfolge ihrer Priorität:
1. die Zeichenfolge selbst ohne Auswertung (Format: "raw:xxx")\n
2. eine evaluierte Teilzeichenkette (Format: "eval:xxx")
3. eine evaluierte Bedingung (Format: "eval_cond:xxx")
4. eine Zeichenkette mit Escapesequenzen (Format: "esc:xxx" oder "\xxx")
5. Zeichen, die in einer Zeichenkette nicht dargestellt werden sollen (Format: "hide:Zeichen,Zeichenkette")
6. eine Zeichenkette mit einer maximalen Anzahl an Zeichen (Format: "cut:max,suffix,string" oder "cut:+max,suffix,string")
oder maximale Anzahl an Zeichen die auf dem Bildschirm angezeigt werden sollen (Format: "cutscr:Max,Suffix,Zeichenkette oder "cutscr:+Max,Suffix,Zeichenkette")
7. eine Zeichenkette umkehren (Format: "rev:xxx" oder "revscr:xxx")
8. eine Zeichenkette wiederholen (Format: "repeat:Anzahl,Zeichenkette")
9. Länge einer Zeichenkette (Format: "length:xxx" oder "lengthscr:xxx")
10. eine Farbe (Format: "color:xxx", siehe "Anleitung für API Erweiterung", Funktion "color")
11. zum modifizieren (Format: "modifier:name,data,string")
12. eine Info (Format: "Info:Name,Argumente", Argumente sind optional)
13. eine Basis 16/32/64 kodierte / dekodierte Zeichenfolge (Format: "base_encode:base,xxx" oder "base_decode:base,xxx")
14. aktuelles Datum/Uhrzeit (Format: "date" oder "date:format")
15. eine Umgebungsvariable (Format: "env:XXX")
16. ein Dreifachoperand (Format: "if:Bedingung?Wert_falls_wahr:Wert_falls_unwahr")
17. Ergebnis eines Ausdrucks mit Klammern und Operatoren + - * / // % ** (Format: "calc:xxx")
19. eine übersetzte Zeichenkette (Format: "translate:xxx")
18. eine zufällige ganze Zahl (Format: "random:min,max")
20. eine Option (Format: "file.section.option")
21. eine lokale Variable eines Buffers
22. ein(e) hdata - Name/Variable (der Wert wird automatisch in eine Zeichenkette konvertiert), standardmäßig wird für "window" und "buffer" das aktuelle Fenster/Buffer verwendet.
Das Format für hdata kann wie folgt aufgebaut sein:
hdata.var1.var2...: startet mit hdata (der Pointer muss bekannt sein) und fragt eine Variable nach der anderen ab (weitere hdata können folgen)
hdata[list].var1.var2...: startet hdata mittels einer Liste, zum Beispiel:
${buffer[gui_buffers].full_name}: der vollständige Name des ersten Buffers, in der verknüpften Liste aller Buffer
${plugin[weechat_plugins].name}: Name der ersten Erweiterung, in der verknüpften Liste aller Erweiterungen
hdata[pointer].var1.var2...: startet hdata mittels einem Pointer, zum Beispiel:
${buffer[0x1234abcd].full_name}: vollständiger Name eines Buffers und des dazugehörigen Pointers (kann in triggern benutzt werden)
${buffer[my_pointer].full_name}: vollständiger Name des Buffers mit dem entsprechenden Pointernamen (kann in Triggern verwendet werden)
Die vorhandenen Namen für hdata und Variablen sind in der "Anleitung für API Erweiterung", Bereich "weechat_hdata_get". beschrieben
Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
1. the string itself without evaluation (format: "raw:xxx")
2. an evaluated sub-string (format: "eval:xxx")
3. an evaluated condition (format: "eval_cond:xxx")
4. a string with escaped chars (format: "esc:xxx" or "\xxx")
5. a string with chars to hide (format: "hide:char,string")
6. a string with max chars (format: "cut:max,suffix,string" or "cut:+max,suffix,string")
or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
7. a reversed string (format: "rev:xxx" or "revscr:xxx")
8. a repeated string (format: "repeat:count,string")
9. length of a string (format: "length:xxx" or "lengthscr:xxx")
10. split of a string (format: "split:number,separators,flags,xxx")
11. split of shell argmuents (format: "split_shell:number,xxx")
12. a color (format: "color:xxx", see "Plugin API reference", function "color")
13. a modifier (format: "modifier:name,data,string")
14. an info (format: "info:name,arguments", arguments are optional)
15. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
16. current date/time (format: "date" or "date:format")
17. an environment variable (format: "env:XXX")
18. a ternary operator (format: "if:condition?value_if_true:value_if_false")
19. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
20. a random integer number (format: "random:min,max")
21. a translated string (format: "translate:xxx")
22. an option (format: "file.section.option")
23. a local variable in buffer
24. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list/pointer/pointer name, for example:
${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
hdata[pointer].var1.var2...: start with a hdata using a pointer, for example:
${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
${buffer[my_pointer].full_name}: full name of the buffer with this pointer name (can be used in triggers)
For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
Beispiele (einfache Zeichenketten):
Examples (simple strings):
/eval -n ${raw:${info:version}} ==> ${info:version}
/eval -n ${eval_cond:${window.win_width}>100} ==> 1
/eval -n ${info:version} ==> 0.4.3
/eval -n ${env:HOME} ==> /home/user
/eval -n ${weechat.look.scroll_amount} ==> 3
/eval -n ${sec.data.password} ==> geheim
/eval -n ${sec.data.password} ==> secret
/eval -n ${window} ==> 0x2549aa0
/eval -n ${window.buffer} ==> 0x2549320
/eval -n ${window.buffer.full_name} ==> core.weechat
@ -1427,13 +1429,21 @@ Beispiele (einfache Zeichenketten):
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
/eval -n ${split:1,,,abc,def,ghi} ==> abc
/eval -n ${split:-1,,,abc,def,ghi} ==> ghi
/eval -n ${split:count,,,abc,def,ghi} ==> 3
/eval -n ${split:random,,,abc,def,ghi} ==> def
/eval -n ${split_shell:1,"arg 1" arg2} ==> arg 1
/eval -n ${split_shell:-1,"arg 1" arg2} ==> arg2
/eval -n ${split_shell:count,"arg 1" arg2} ==> 2
/eval -n ${split_shell:random,"arg 1" arg2} ==> arg2
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==
/eval -n ${base_decode:64,dGVzdA==} ==> test
/eval -n ${translate:Plugin} ==> Erweiterung
/eval -n ${translate:Plugin} ==> Extension
Beispiele (Bedingungen):
Examples (conditions):
/eval -n -c ${window.buffer.number} > 2 ==> 0
/eval -n -c ${window.win_width} > 100 ==> 1
/eval -n -c (8 > 12) || (5 > 2) ==> 1
@ -1545,63 +1555,63 @@ value: Anzahl der gewünschten Einträgen im Befehlsverlauf anzeigen
----
/input <action> [<arguments>]
list of actions:
return: simulate key "enter"
complete_next: complete word with next completion
complete_previous: complete word with previous completion
search_text_here: search text in buffer at current position
search_text: search text in buffer
search_switch_case: switch exact case for search
search_switch_regex: switch search type: string/regular expression
search_switch_where: switch search in messages/prefixes
search_previous: search previous line
search_next: search next line
search_stop_here: stop search at current position
search_stop: stop search
delete_previous_char: delete previous char
delete_next_char: delete next char
delete_previous_word: delete previous word
delete_next_word: delete next word
delete_beginning_of_line: delete from beginning of line until cursor
delete_end_of_line: delete from cursor until end of line
delete_line: delete entire line
clipboard_paste: paste from the internal clipboard
transpose_chars: transpose two chars
undo: undo last command line action
redo: redo last command line action
move_beginning_of_line: move cursor to beginning of line
move_end_of_line: move cursor to end of line
move_previous_char: move cursor to previous char
move_next_char: move cursor to next char
move_previous_word: move cursor to previous word
move_next_word: move cursor to next word
history_previous: recall previous command in current buffer history
history_next: recall next command in current buffer history
history_global_previous: recall previous command in global history
history_global_next: recall next command in global history
jump_smart: jump to next buffer with activity
jump_last_buffer_displayed: jump to last buffer displayed (before last jump to a buffer)
jump_previously_visited_buffer: jump to previously visited buffer
jump_next_visited_buffer: jump to next visited buffer
hotlist_clear: clear hotlist (optional argument: "lowest" to clear only lowest level in hotlist, "highest" to clear only highest level in hotlist, or level mask: integer which is a combination of 1=join/part, 2=message, 4=private, 8=highlight)
hotlist_remove_buffer: remove current buffer from hotlist
hotlist_restore_buffer: restore latest hotlist removed in the current buffer
hotlist_restore_all: restore latest hotlist removed in all buffers
grab_key: grab a key (optional argument: delay for end of grab, default is 500 milliseconds)
grab_key_command: grab a key with its associated command (optional argument: delay for end of grab, default is 500 milliseconds)
grab_mouse: grab mouse event code
grab_mouse_area: grab mouse event code with area
set_unread: set unread marker for all buffers
set_unread_current_buffer: set unread marker for current buffer
switch_active_buffer: switch to next merged buffer
switch_active_buffer_previous: switch to previous merged buffer
zoom_merged_buffer: zoom on merged buffer
insert: insert text in command line (escaped chars are allowed, see /help print)
send: send text to the buffer
paste_start: start paste (bracketed paste mode)
paste_stop: stop paste (bracketed paste mode)
Auflistung der möglichen Aktionen:
return: simuliert die "enter" Taste
complete_next: vervollständigt Wort mit nächster Komplettierung
complete_previous: vervollständigt Word mit vorheriger Komplettierung
search_text_here: Textsuche ab aktueller Position
search_text: Textsuche im Buffer
search_switch_case: schaltet Groß-/Kleinschreibung ein und aus
search_switch_regex: Wechsel des Suchmodus: einfache Textsuche/reguläre Ausdrücke
search_switch_where: wechselt Suche in Nachricht/Präfix
search_previous: sucht vorheriger Zeile
search_next: sucht nächste Zeile
search_stop_here: beendet Suche ab aktueller Position
search_stop: suche beenden
delete_previous_char: entfernt vorheriges Zeichen
delete_next_char: entfernt nächstes Zeichen
delete_previous_word: entfernt vorheriges Wort
delete_next_word: entfernt nächstes Wort
delete_beginning_of_line: entfernt alle Zeichen ab Zeilenanfang bis zum Cursor
delete_end_of_line: entfernt alle Zeichen ab Cursor bis zum Ende der Zeile
delete_line: löscht die komplette Eingabezeile
clipboard_paste: fügt Zeichenkette aus der internen Zwischenablage ein
transpose_chars: Zeichen austauschen
undo: letzten Befehl in der Eingabezeile rückgängig machen
redo: letzten Befehl in der Eingabezeile wiederherstellen
move_beginning_of_line: springt an den Anfang der Eingabezeile
move_end_of_line: springt ans Ende der Eingabezeile
move_previous_char: setzt den Cursor eine Position nach links
move_next_char: setzt den Cursor eine Position nach rechts
move_previous_word: springt zum Anfang des vorherigen Wortes, in der Eingabezeile
move_next_word: springt zum Anfang des nächsten Wortes, in der Eingabezeile
history_previous: ruft vorherigen Befehl oder Nachricht aus dem Befehlsspeicher auf (im Such-Modus: rückwärts suchen)
history_next: ruft nächsten Befehl oder Nachricht aus dem Befehlsspeicher auf (im Such-Modus: vorwärts suchen)
history_global_previous: ruft vorherigen Befehl/Nachricht aus dem globalen Befehlsspeicher auf (für alle Buffer)
history_global_next: ruft nächsten Befehl/Nachricht aus dem globalen Befehlsspeicher auf (für alle Buffer)
jump_smart: wechselt zum nächsten Buffer mit Aktivität (nach Priorität: highlight, Nachricht, …)
jump_last_buffer_displayed: wechselt zum jeweils zuletzt angezeigten Buffer
jump_previously_visited_buffer: springt zum letzten besuchten Buffer
jump_next_visited_buffer: springt zum nächsten besuchten Buffer
hotlist_clear: löscht Hotlist (Aktivitätsanzeige für die Buffer), (optionales Argument: "lowest" löscht den niedrigsten Eintrag der Hotlist, "highest" löscht den höchsten Eintrag der Hotlist, oder eine integer Maske: eine Kombination aus 1=join/part, 2=Nachricht,4=privat,8=highlight)
hotlist_remove_buffer: entferne aktuellen Buffer von der Hotlist
hotlist_restore_buffer: Wiederherstellen der neuesten Hotlist, die im aktuellen Buffer entfernt wurde
hotlist_restore_all: Wiederherstellen der neuesten Hotlist, die in allen Buffern entfernt wurde
grab_key: fängt eine Taste (optionales Argument: Verzögerung um eine Taste einzufangen. Standard sind 500 Millisekunden)
grab_key_command: zeigt den Tastencode (inklusive des eingebundenen Befehls) einer Tastenkombination an und fügt ihn in die Befehlszeile ein (optionales Argument: Verzögerung um eine Taste einzufangen. Standard sind 500 Millisekunden)
grab_mouse: fängt den Code einer Maus Aktivität
grab_mouse_area: fängt den Code einer Maus Aktivität mit entsprechendem Bereich
set_unread: setzt für alle Buffer die Markierung der ungelesen Nachrichten
set_unread_current_buffer: setzt nur für den aktuellen Buffer eine Markierung der ungelesen Nachrichten
switch_active_buffer: springt zum nächsten zusammengefügten Buffer
switch_active_buffer_previous: springt zum vorherigen zusammengefügten Buffer
zoom_merged_buffer: zoomt in zusammengefügte Buffer
insert: fügt einen Text in die Eingabezeile ein (Escapesequenzen sind möglich, siehe /help print)
send: schickt Text an einen Buffer
paste_start: Einfügen wird gestartet (bracketed paste mode)
paste_stop: Einfügen wird beendet (bracketed paste mode)
This command is used by key bindings or plugins.
Dieser Befehl wird sinnvollerweise mittels Tastenbelegungen oder Erweiterungen genutzt.
----
[[command_weechat_key]]

View File

@ -1384,19 +1384,21 @@ Some variables are replaced in expression, using the format ${variable}, variabl
7. a reversed string (format: "rev:xxx" or "revscr:xxx")
8. a repeated string (format: "repeat:count,string")
9. length of a string (format: "length:xxx" or "lengthscr:xxx")
10. a color (format: "color:xxx", see "Plugin API reference", function "color")
11. a modifier (format: "modifier:name,data,string")
12. an info (format: "info:name,arguments", arguments are optional)
13. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
14. current date/time (format: "date" or "date:format")
15. an environment variable (format: "env:XXX")
16. a ternary operator (format: "if:condition?value_if_true:value_if_false")
17. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
18. a random integer number (format: "random:min,max")
19. a translated string (format: "translate:xxx")
20. an option (format: "file.section.option")
21. a local variable in buffer
22. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
10. split of a string (format: "split:number,separators,flags,xxx")
11. split of shell argmuents (format: "split_shell:number,xxx")
12. a color (format: "color:xxx", see "Plugin API reference", function "color")
13. a modifier (format: "modifier:name,data,string")
14. an info (format: "info:name,arguments", arguments are optional)
15. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
16. current date/time (format: "date" or "date:format")
17. an environment variable (format: "env:XXX")
18. a ternary operator (format: "if:condition?value_if_true:value_if_false")
19. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
20. a random integer number (format: "random:min,max")
21. a translated string (format: "translate:xxx")
22. an option (format: "file.section.option")
23. a local variable in buffer
24. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list/pointer/pointer name, for example:
@ -1427,6 +1429,14 @@ Examples (simple strings):
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
/eval -n ${split:1,,,abc,def,ghi} ==> abc
/eval -n ${split:-1,,,abc,def,ghi} ==> ghi
/eval -n ${split:count,,,abc,def,ghi} ==> 3
/eval -n ${split:random,,,abc,def,ghi} ==> def
/eval -n ${split_shell:1,"arg 1" arg2} ==> arg 1
/eval -n ${split_shell:-1,"arg 1" arg2} ==> arg2
/eval -n ${split_shell:count,"arg 1" arg2} ==> 2
/eval -n ${split_shell:random,"arg 1" arg2} ==> arg2
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==

View File

@ -2682,6 +2682,56 @@ expanded to last):
`+4+` +
`+14+`
| `+${split:number,seps,flags,xxx}+` +
_(WeeChat ≥ 3.3)_ |
Split string, and return, according to `number`: +
- `count`: the number of items after split +
- `random`: a random item +
- integer ≥ 1: the item by index (1 = first item) +
- integer ≤ -1: the item by index from the end (-1 = last item, -2 = penultimate item, etc.), +
`seps` is a list of chars that are used as separators (if empty, a comma is used), +
`flags` is a list of flags separated by `+`: +
- `strip_left`: strip separators on the left (beginning of string) +
- `strip_right`: strip separators on the right (end of string) +
- `collapse_seps`: collapse multiple consecutive separators into a single one +
- `keep_eol`: keep end of line for each value +
- `strip_items=xyz`: strip chars `x`, `y` and `z` from beginning/end of items +
- `max_items=N`: return max N items |
`+${split:1,,,abc,def,ghi}+` +
`+${split:-1,,,abc,def,ghi}+` +
`+${split:count,,,abc,def,ghi}+` +
`+${split:random,,,abc,def,ghi}+` +
`+${split:3,,collapse_seps,abc,,,def,,,ghi}+` +
`+${split:3,,strip_items=-_,_-abc-_,_-def-_,_-ghi-_}+` +
`+${split:2, ,,this is a test}+` +
`+${split:2, ,strip_left+strip_right, this is a test }+` +
`+${split:2, ,keep_eol,this is a test}+` |
`+abc+` +
`+ghi+` +
`+3+` +
`+def+` +
`+ghi+` +
`+ghi+` +
`+is+` +
`+is+` +
`+is a test+`
| `+${split_shell:number,xxx}+` +
_(WeeChat ≥ 3.3)_ |
Split shell arguments, and return, according to `number`: +
- `count`: the number of arguments after split +
- `random`: a random argument +
- integer ≥ 1: the argument by index (1 = first argument) +
- integer ≤ -1: the argument by index from the end (-1 = last argument, -2 = penultimate argument, etc.) |
`+${split_shell:1,"first arg" arg2}+` +
`+${split_shell:-1,"first arg" arg2}+` +
`+${split_shell:count,"first arg" arg2}+` +
`+${split_shell:random,"first arg" arg2}+` |
`+first arg+` +
`+arg2+` +
`+2+` +
`+arg2+`
| `+${re:xxx}+` +
_(WeeChat ≥ 1.1)_ |
Regex data: +

View File

@ -1384,19 +1384,21 @@ Des variables sont remplacées dans l'expression, en utilisant le format ${varia
7. une chaîne inversée (format : "rev:xxx" ou "revscr:xxx")
8. une chaîne répétée (format : "repeat:nombre,chaîne")
9. longueur d'une chaîne (format : "length:xxx" ou "lengthscr:xxx")
10. une couleur (format : "color:xxx", voir la "Référence API extension", fonction "color")
11. un modificateur (format : "modifier:nom,données,chaîne")
12. une info (format : "info:nom,paramètres", les paramètres sont optionnels)
13. une chaîne encodée/decodée en base 16, 32 ou 64 (format : "base_encode:base,xxx" ou "base_decode:base,xxx")
14. la date/heure courante (format : "date" ou "date:format")
15. une variable d'environnement (format : "env:XXX")
16. un opérateur ternaire (format : "if:condition?valeur_si_vrai:valeur_si_faux")
17. le résultat d'une expression avec parenthèses et les opérateurs + - * / // % ** (format: "calc:xxx")
18. un nombre entier aléatoire (format : "random:min,max")
19. une chaîne traduite (format : "translate:xxx")
20. une option (format : "fichier.section.option")
21. une variable locale du tampon
22. un hdata/variable (la valeur est automatiquement convertie en chaîne), par défaut "window" et "buffer" pointent vers la fenêtre et le tampon courants.
10. découpage d'une chaîne (format : "split:nombre,séparateurs,flags,xxx")
11. découpage de paramètres shell (format : "split_shell:nombre,xxx")
12. une couleur (format : "color:xxx", voir la "Référence API extension", fonction "color")
13. un modificateur (format : "modifier:nom,données,chaîne")
14. une info (format : "info:nom,paramètres", les paramètres sont optionnels)
15. une chaîne encodée/decodée en base 16, 32 ou 64 (format : "base_encode:base,xxx" ou "base_decode:base,xxx")
16. la date/heure courante (format : "date" ou "date:format")
17. une variable d'environnement (format : "env:XXX")
18. un opérateur ternaire (format : "if:condition?valeur_si_vrai:valeur_si_faux")
19. le résultat d'une expression avec parenthèses et les opérateurs + - * / // % ** (format: "calc:xxx")
20. un nombre entier aléatoire (format : "random:min,max")
21. une chaîne traduite (format : "translate:xxx")
22. une option (format : "fichier.section.option")
23. une variable locale du tampon
24. un hdata/variable (la valeur est automatiquement convertie en chaîne), par défaut "window" et "buffer" pointent vers la fenêtre et le tampon courants.
Le format du hdata peut être le suivant :
hdata.var1.var2... : démarrer avec un hdata (le pointeur doit être connu), et demander les variables l'une après l'autre (d'autres hdata peuvent être suivis)
hdata[liste].var1.var2... : démarrer avec un hdata en utilisant une liste/pointeur/nom de pointeur, par exemple :
@ -1427,6 +1429,14 @@ Exemples (chaînes simples) :
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
/eval -n ${split:1,,,abc,def,ghi} ==> abc
/eval -n ${split:-1,,,abc,def,ghi} ==> ghi
/eval -n ${split:count,,,abc,def,ghi} ==> 3
/eval -n ${split:random,,,abc,def,ghi} ==> def
/eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1
/eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2
/eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2
/eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==

View File

@ -2728,6 +2728,56 @@ première étendue à la dernière) :
`+4+` +
`+14+`
| `+${split:number,seps,flags,xxx}+` +
_(WeeChat ≥ 3.3)_ |
Chaîne découpée, et retour, selon `number` : +
- `count` : nombre d'éléments après le découpage +
- `random` : un élément au hasard +
- entier ≥ 1 : l'élément par son index (1 = premier élément) +
- entier ≤ -1 : l'élément par son index en partant de la fin (-1 = dernier élément, -2 = avant-dernier élément, etc.), +
`seps` est une liste de caractères qui sont utilisés comme séparateurs (si vide, une virgule est utilisé), +
`flags` est une liste de drapeaux séparés par `+`: +
- `strip_left` : supprimer les séparateurs sur la gauche (début de chaîne) +
- `strip_right` : supprimer les séparateurs sur la droite (fin de chaîne) +
- `collapse_seps` : regrouper de multiples séparateurs consécutifs en un seul +
- `keep_eol` : garder jusqu'à la fin de la ligne pour chaque valeur +
- `strip_items=xyz` : supprimer les caractères `x`, `y` et `z` au début/fin des éléments +
- `max_items=N` : retourner au plus N éléments |
`+${split:1,,,abc,def,ghi}+` +
`+${split:-1,,,abc,def,ghi}+` +
`+${split:count,,,abc,def,ghi}+` +
`+${split:random,,,abc,def,ghi}+` +
`+${split:3,,collapse_seps,abc,,,def,,,ghi}+` +
`+${split:3,,strip_items=-_,_-abc-_,_-def-_,_-ghi-_}+` +
`+${split:2, ,,this is a test}+` +
`+${split:2, ,strip_left+strip_right, this is a test }+` +
`+${split:2, ,keep_eol,this is a test}+` |
`+abc+` +
`+ghi+` +
`+3+` +
`+def+` +
`+ghi+` +
`+ghi+` +
`+is+` +
`+is+` +
`+is a test+`
| `+${split_shell:number,xxx}+` +
_(WeeChat ≥ 3.3)_ |
Paramètres shells découpés, et retour, selon `number` : +
- `count` : le nombre de paramètres après découpage +
- `random` : un paramètre au hasard +
- entier ≥ 1 : le paramètre par son index (1 = premier paramètre) +
- entier ≤ -1 : le paramètre par son index en partant de la fin (-1 = dernier paramètre, -2 = avant-dernier paramètre, etc.) |
`+${split_shell:1,"first arg" arg2}+` +
`+${split_shell:-1,"first arg" arg2}+` +
`+${split_shell:count,"first arg" arg2}+` +
`+${split_shell:random,"first arg" arg2}+` |
`+first arg+` +
`+arg2+` +
`+2+` +
`+arg2+`
| `+${re:xxx}+` +
_(WeeChat ≥ 1.1)_ |
Données sur l'expression régulière : +

View File

@ -1384,19 +1384,21 @@ Some variables are replaced in expression, using the format ${variable}, variabl
7. a reversed string (format: "rev:xxx" or "revscr:xxx")
8. a repeated string (format: "repeat:count,string")
9. length of a string (format: "length:xxx" or "lengthscr:xxx")
10. a color (format: "color:xxx", see "Plugin API reference", function "color")
11. a modifier (format: "modifier:name,data,string")
12. an info (format: "info:name,arguments", arguments are optional)
13. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
14. current date/time (format: "date" or "date:format")
15. an environment variable (format: "env:XXX")
16. a ternary operator (format: "if:condition?value_if_true:value_if_false")
17. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
18. a random integer number (format: "random:min,max")
19. a translated string (format: "translate:xxx")
20. an option (format: "file.section.option")
21. a local variable in buffer
22. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
10. split of a string (format: "split:number,separators,flags,xxx")
11. split of shell argmuents (format: "split_shell:number,xxx")
12. a color (format: "color:xxx", see "Plugin API reference", function "color")
13. a modifier (format: "modifier:name,data,string")
14. an info (format: "info:name,arguments", arguments are optional)
15. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
16. current date/time (format: "date" or "date:format")
17. an environment variable (format: "env:XXX")
18. a ternary operator (format: "if:condition?value_if_true:value_if_false")
19. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
20. a random integer number (format: "random:min,max")
21. a translated string (format: "translate:xxx")
22. an option (format: "file.section.option")
23. a local variable in buffer
24. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list/pointer/pointer name, for example:
@ -1427,6 +1429,14 @@ Examples (simple strings):
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
/eval -n ${split:1,,,abc,def,ghi} ==> abc
/eval -n ${split:-1,,,abc,def,ghi} ==> ghi
/eval -n ${split:count,,,abc,def,ghi} ==> 3
/eval -n ${split:random,,,abc,def,ghi} ==> def
/eval -n ${split_shell:1,"arg 1" arg2} ==> arg 1
/eval -n ${split_shell:-1,"arg 1" arg2} ==> arg2
/eval -n ${split_shell:count,"arg 1" arg2} ==> 2
/eval -n ${split_shell:random,"arg 1" arg2} ==> arg2
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==

View File

@ -2780,6 +2780,56 @@ expanded to last):
`+4+` +
`+14+`
| `+${split:number,seps,flags,xxx}+` +
_(WeeChat ≥ 3.3)_ |
Split string, and return, according to `number`: +
- `count`: the number of items after split +
- `random`: a random item +
- integer ≥ 1: the item by index (1 = first item) +
- integer ≤ -1: the item by index from the end (-1 = last item, -2 = penultimate item, etc.), +
`seps` is a list of chars that are used as separators (if empty, a comma is used), +
`flags` is a list of flags separated by `+`: +
- `strip_left`: strip separators on the left (beginning of string) +
- `strip_right`: strip separators on the right (end of string) +
- `collapse_seps`: collapse multiple consecutive separators into a single one +
- `keep_eol`: keep end of line for each value +
- `strip_items=xyz`: strip chars `x`, `y` and `z` from beginning/end of items +
- `max_items=N`: return max N items |
`+${split:1,,,abc,def,ghi}+` +
`+${split:-1,,,abc,def,ghi}+` +
`+${split:count,,,abc,def,ghi}+` +
`+${split:random,,,abc,def,ghi}+` +
`+${split:3,,collapse_seps,abc,,,def,,,ghi}+` +
`+${split:3,,strip_items=-_,_-abc-_,_-def-_,_-ghi-_}+` +
`+${split:2, ,,this is a test}+` +
`+${split:2, ,strip_left+strip_right, this is a test }+` +
`+${split:2, ,keep_eol,this is a test}+` |
`+abc+` +
`+ghi+` +
`+3+` +
`+def+` +
`+ghi+` +
`+ghi+` +
`+is+` +
`+is+` +
`+is a test+`
| `+${split_shell:number,xxx}+` +
_(WeeChat ≥ 3.3)_ |
Split shell arguments, and return, according to `number`: +
- `count`: the number of arguments after split +
- `random`: a random argument +
- integer ≥ 1: the argument by index (1 = first argument) +
- integer ≤ -1: the argument by index from the end (-1 = last argument, -2 = penultimate argument, etc.) |
`+${split_shell:1,"first arg" arg2}+` +
`+${split_shell:-1,"first arg" arg2}+` +
`+${split_shell:count,"first arg" arg2}+` +
`+${split_shell:random,"first arg" arg2}+` |
`+first arg+` +
`+arg2+` +
`+2+` +
`+arg2+`
| `+${re:xxx}+` +
_(WeeChat ≥ 1.1)_ |
Regex data: +

View File

@ -1384,19 +1384,21 @@ Some variables are replaced in expression, using the format ${variable}, variabl
7. a reversed string (format: "rev:xxx" or "revscr:xxx")
8. a repeated string (format: "repeat:count,string")
9. length of a string (format: "length:xxx" or "lengthscr:xxx")
10. a color (format: "color:xxx", see "Plugin API reference", function "color")
11. a modifier (format: "modifier:name,data,string")
12. an info (format: "info:name,arguments", arguments are optional)
13. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
14. current date/time (format: "date" or "date:format")
15. an environment variable (format: "env:XXX")
16. a ternary operator (format: "if:condition?value_if_true:value_if_false")
17. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
18. a random integer number (format: "random:min,max")
19. a translated string (format: "translate:xxx")
20. an option (format: "file.section.option")
21. a local variable in buffer
22. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
10. split of a string (format: "split:number,separators,flags,xxx")
11. split of shell argmuents (format: "split_shell:number,xxx")
12. a color (format: "color:xxx", see "Plugin API reference", function "color")
13. a modifier (format: "modifier:name,data,string")
14. an info (format: "info:name,arguments", arguments are optional)
15. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
16. current date/time (format: "date" or "date:format")
17. an environment variable (format: "env:XXX")
18. a ternary operator (format: "if:condition?value_if_true:value_if_false")
19. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
20. a random integer number (format: "random:min,max")
21. a translated string (format: "translate:xxx")
22. an option (format: "file.section.option")
23. a local variable in buffer
24. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list/pointer/pointer name, for example:
@ -1427,6 +1429,14 @@ Examples (simple strings):
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
/eval -n ${split:1,,,abc,def,ghi} ==> abc
/eval -n ${split:-1,,,abc,def,ghi} ==> ghi
/eval -n ${split:count,,,abc,def,ghi} ==> 3
/eval -n ${split:random,,,abc,def,ghi} ==> def
/eval -n ${split_shell:1,"arg 1" arg2} ==> arg 1
/eval -n ${split_shell:-1,"arg 1" arg2} ==> arg2
/eval -n ${split_shell:count,"arg 1" arg2} ==> 2
/eval -n ${split_shell:random,"arg 1" arg2} ==> arg2
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==

View File

@ -2717,6 +2717,58 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio
`+4+` +
`+14+`
// TRANSLATION MISSING
| `+${split:number,seps,flags,xxx}+` +
_(WeeChat ≥ 3.3)_ |
Split string, and return, according to `number`: +
- `count`: the number of items after split +
- `random`: a random item +
- integer ≥ 1: the item by index (1 = first item) +
- integer ≤ -1: the item by index from the end (-1 = last item, -2 = penultimate item, etc.), +
`seps` is a list of chars that are used as separators (if empty, a comma is used), +
`flags` is a list of flags separated by `+`: +
- `strip_left`: strip separators on the left (beginning of string) +
- `strip_right`: strip separators on the right (end of string) +
- `collapse_seps`: collapse multiple consecutive separators into a single one +
- `keep_eol`: keep end of line for each value +
- `strip_items=xyz`: strip chars `x`, `y` and `z` from beginning/end of items +
- `max_items=N`: return max N items |
`+${split:1,,,abc,def,ghi}+` +
`+${split:-1,,,abc,def,ghi}+` +
`+${split:count,,,abc,def,ghi}+` +
`+${split:random,,,abc,def,ghi}+` +
`+${split:3,,collapse_seps,abc,,,def,,,ghi}+` +
`+${split:3,,strip_items=-_,_-abc-_,_-def-_,_-ghi-_}+` +
`+${split:2, ,,this is a test}+` +
`+${split:2, ,strip_left+strip_right, this is a test }+` +
`+${split:2, ,keep_eol,this is a test}+` |
`+abc+` +
`+ghi+` +
`+3+` +
`+def+` +
`+ghi+` +
`+ghi+` +
`+is+` +
`+is+` +
`+is a test+`
// TRANSLATION MISSING
| `+${split_shell:number,xxx}+` +
_(WeeChat ≥ 3.3)_ |
Split shell arguments, and return, according to `number`: +
- `count`: the number of arguments after split +
- `random`: a random argument +
- integer ≥ 1: the argument by index (1 = first argument) +
- integer ≤ -1: the argument by index from the end (-1 = last argument, -2 = penultimate argument, etc.) |
`+${split_shell:1,"first arg" arg2}+` +
`+${split_shell:-1,"first arg" arg2}+` +
`+${split_shell:count,"first arg" arg2}+` +
`+${split_shell:random,"first arg" arg2}+` |
`+first arg+` +
`+arg2+` +
`+2+` +
`+arg2+`
// TRANSLATION MISSING
| `+${re:xxx}+` +
_(WeeChat ≥ 1.1)_ |

View File

@ -1383,19 +1383,21 @@ Some variables are replaced in expression, using the format ${variable}, variabl
7. a reversed string (format: "rev:xxx" or "revscr:xxx")
8. a repeated string (format: "repeat:count,string")
9. length of a string (format: "length:xxx" or "lengthscr:xxx")
10. a color (format: "color:xxx", see "Plugin API reference", function "color")
11. a modifier (format: "modifier:name,data,string")
12. an info (format: "info:name,arguments", arguments are optional)
13. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
14. current date/time (format: "date" or "date:format")
15. an environment variable (format: "env:XXX")
16. a ternary operator (format: "if:condition?value_if_true:value_if_false")
17. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
18. a random integer number (format: "random:min,max")
19. a translated string (format: "translate:xxx")
20. an option (format: "file.section.option")
21. a local variable in buffer
22. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
10. split of a string (format: "split:number,separators,flags,xxx")
11. split of shell argmuents (format: "split_shell:number,xxx")
12. a color (format: "color:xxx", see "Plugin API reference", function "color")
13. a modifier (format: "modifier:name,data,string")
14. an info (format: "info:name,arguments", arguments are optional)
15. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
16. current date/time (format: "date" or "date:format")
17. an environment variable (format: "env:XXX")
18. a ternary operator (format: "if:condition?value_if_true:value_if_false")
19. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
20. a random integer number (format: "random:min,max")
21. a translated string (format: "translate:xxx")
22. an option (format: "file.section.option")
23. a local variable in buffer
24. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list/pointer/pointer name, for example:
@ -1426,6 +1428,14 @@ Examples (simple strings):
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
/eval -n ${split:1,,,abc,def,ghi} ==> abc
/eval -n ${split:-1,,,abc,def,ghi} ==> ghi
/eval -n ${split:count,,,abc,def,ghi} ==> 3
/eval -n ${split:random,,,abc,def,ghi} ==> def
/eval -n ${split_shell:1,"arg 1" arg2} ==> arg 1
/eval -n ${split_shell:-1,"arg 1" arg2} ==> arg2
/eval -n ${split_shell:count,"arg 1" arg2} ==> 2
/eval -n ${split_shell:random,"arg 1" arg2} ==> arg2
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==

View File

@ -8,7 +8,7 @@
|===
| Додатак | Име | Опис | Хеш табела (улаз) | Хеш табела (излаз)
| irc | irc_message_parse | парсирање IRC поруке | „message”: IRC порука, „server”: име сервера (није обавезно) | "tags": tags, "tag_xxx": unescaped value of tag "xxx" (one key per tag), "message_without_tags": message without the tags, "nick": nick, "user": user, "host": host, "command": command, "channel": channel, "arguments": arguments (includes channel), "text": text (for example user message), "pos_command": index of "command" message ("-1" if "command" was not found), "pos_arguments": index of "arguments" message ("-1" if "arguments" was not found), "pos_channel": index of "channel" message ("-1" if "channel" was not found), "pos_text": index of "text" message ("-1" if "text" was not found)
| irc | irc_message_parse | парсирање IRC поруке | „message”: IRC порука, „server”: име сервера (није обавезно) | „tags”: ознаке, „tag_xxx”: неозначена вредност ознаке „xxx” (један кључ по ознаци), „message_without_tags”: поруке без ознака, „nick”: надимак, „user”: корисник, „host”: хост, „command”: команда, „channel”: канал, „arguments”: аргументи (укључујући channel), „text”: текст (на пример, корисничка порука), „pos_command”: индекс „command” поруке („-1” ако „command” није пронађена), „pos_arguments”: индекс „arguments” поруке („-1” ако „arguments” није пронађена), „pos_channel”: индекс „channel” поруке („-1” ако „channel” није пронађена), „pos_text”: индекс „text” поруке („-1” ако „text” није пронађена)
| irc | irc_message_split | подела IRC поруке (подразумевано тако да стане у 512 бајтова) | „message”: IRC порука, „server”: име сервера (није обавезно) | „msg1” ... „msgN”: поруке које се шаљу (без „\r\n” на крају), „args1” ... „argsN”: аргументи порука, „count”: број порука

View File

@ -17,32 +17,32 @@
* `+allchan+`: извршавање команде на свим каналима свих повезаних сервера
----
/allchan [-current] [-parted] [-exclude=<channel>[,<channel>...]] <command>
[-current] [-parted] -include=<channel>[,<channel>...] <command>
/allchan [-current] [-parted] [-exclude=<канал>[,<канал>...]] <команда>
[-current] [-parted] -include=<канал>[,<канал>...] <команда>
-current: execute command for channels of current server only
-parted: execute on parted channels only
-exclude: exclude some channels (wildcard "*" is allowed)
-include: include only some channels (wildcard "*" is allowed)
command: command to execute (or text to send to buffer if command does not start with '/')
-current: команда се извршава само за канале текућег сервера
-parted: команда се извршава само на напуштеним каналима
-exclude: неки канали се изузимају (дозвољен је џокер „*”)
-include: узимају се у обзир само неки канали (дозвољен је џокер „*”)
команда: команда која треба да се изврши (или текст који се шаље баферу ако команда не почиње са /)
Command and arguments are evaluated (see /help eval), the following variables are replaced:
$server server name
$channel channel name
$nick nick on server
${irc_server.xxx} variable xxx in server
${irc_channel.xxx} variable xxx in channel
Команде и аргументи се израчунавају (погледајте /help eval), замењују се следеће променљиве:
$server име сервера
$channel име канала
$nick надимак на серверу
${irc_server.xxx} променљива xxx на серверу
${irc_channel.xxx} променљива xxx на каналу
Examples:
execute '/me is testing' on all channels:
Примери:
извршава /me is testing на свим каналима:
/allchan /me is testing
say 'hello' everywhere but not on #weechat:
/allchan -exclude=#weechat hello
say 'hello' everywhere but not on #weechat and channels beginning with #linux:
/allchan -exclude=#weechat,#linux* hello
say 'hello' on all channels beginning with #linux:
/allchan -include=#linux* hello
close all buffers with parted channels:
каже ’здраво’ свуда осим на #weechat:
/allchan -exclude=#weechat здраво
каже ’здраво’ свуда осим на #weechat и каналима који почињу са #linux:
/allchan -exclude=#weechat,#linux* здраво
каже ’здраво’ на свим каналима који почињу на #linux:
/allchan -include=#linux* здраво
затвара све бафере са напуштеним каналима:
/allchan -parted /close
----
@ -104,23 +104,23 @@ Examples:
----
[[command_irc_auth]]
* `+auth+`: authenticate with SASL
* `+auth+`: аутентификација са SASL
----
/auth [<username> <password>]
/auth [<кор_име> <лозинка>]
username: SASL username (content is evaluated, see /help eval; server options are evaluated with ${irc_server.xxx} and ${server} is replaced by the server name)
password: SASL password or path to file with private key (content is evaluated, see /help eval; server options are evaluated with ${irc_server.xxx} and ${server} is replaced by the server name)
кор_име: SASL корисничко име (садржај се израчунава, погледајте /help eval; опције сервера се израчунавају са ${irc_server.xxx} и ${server} се замењује са именом сервера)
лозинка: SASL лозинка или путања до фајла са приватним кључем (садржај се израчунава, погледајте /help eval; опције сервера се израчунавају са ${irc_server.xxx} и ${server} се замњеује именом сервера)
If username and password are not provided, the values from server options "sasl_username" and "sasl_password" (or "sasl_key") are used.
Ако се не наведу корисничко име и лозинка, користе се вредности из серверских опције „sasl_username” и „sasl_password” (или „sasl_key”).
Examples:
authenticate with username/password defined in the server:
Примери:
аутентификација са корисничким именом/лозинком дефинисаним на серверу:
/auth
authenticate as a different user:
/auth user2 password2
authenticate as a different user with mechanism ecdsa-nist256p-challenge:
/auth user2 ${weechat_config_dir}/ecdsa2.pem
аутентификација као други корисник:
/auth корисник2 лозинка2
аутентификација као други корисник ecdsa-nist256p-challenge механизмом:
/auth корисник2 ${weechat_config_dir}/ecdsa2.pem
----
[[command_irc_ban]]
@ -1384,19 +1384,21 @@ Some variables are replaced in expression, using the format ${variable}, variabl
7. a reversed string (format: "rev:xxx" or "revscr:xxx")
8. a repeated string (format: "repeat:count,string")
9. length of a string (format: "length:xxx" or "lengthscr:xxx")
10. a color (format: "color:xxx", see "Plugin API reference", function "color")
11. a modifier (format: "modifier:name,data,string")
12. an info (format: "info:name,arguments", arguments are optional)
13. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
14. current date/time (format: "date" or "date:format")
15. an environment variable (format: "env:XXX")
16. a ternary operator (format: "if:condition?value_if_true:value_if_false")
17. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
18. a random integer number (format: "random:min,max")
19. a translated string (format: "translate:xxx")
20. an option (format: "file.section.option")
21. a local variable in buffer
22. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
10. split of a string (format: "split:number,separators,flags,xxx")
11. split of shell argmuents (format: "split_shell:number,xxx")
12. a color (format: "color:xxx", see "Plugin API reference", function "color")
13. a modifier (format: "modifier:name,data,string")
14. an info (format: "info:name,arguments", arguments are optional)
15. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
16. current date/time (format: "date" or "date:format")
17. an environment variable (format: "env:XXX")
18. a ternary operator (format: "if:condition?value_if_true:value_if_false")
19. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
20. a random integer number (format: "random:min,max")
21. a translated string (format: "translate:xxx")
22. an option (format: "file.section.option")
23. a local variable in buffer
24. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
Format for hdata can be one of following:
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
hdata[list].var1.var2...: start with a hdata using a list/pointer/pointer name, for example:
@ -1427,6 +1429,14 @@ Examples (simple strings):
/eval -n ${rev:Hello} ==> olleH
/eval -n ${repeat:5,-} ==> -----
/eval -n ${length:test} ==> 4
/eval -n ${split:1,,,abc,def,ghi} ==> abc
/eval -n ${split:-1,,,abc,def,ghi} ==> ghi
/eval -n ${split:count,,,abc,def,ghi} ==> 3
/eval -n ${split:random,,,abc,def,ghi} ==> def
/eval -n ${split_shell:1,"arg 1" arg2} ==> arg 1
/eval -n ${split_shell:-1,"arg 1" arg2} ==> arg2
/eval -n ${split_shell:count,"arg 1" arg2} ==> 2
/eval -n ${split_shell:random,"arg 1" arg2} ==> arg2
/eval -n ${calc:(5+2)*3} ==> 21
/eval -n ${random:0,10} ==> 3
/eval -n ${base_encode:64,test} ==> dGVzdA==
@ -1545,63 +1555,63 @@ addreplace: додаје или замењује постојећи филтер
----
/input <акција> [<аргументи>]
list of actions:
return: simulate key "enter"
complete_next: complete word with next completion
complete_previous: complete word with previous completion
search_text_here: search text in buffer at current position
search_text: search text in buffer
search_switch_case: switch exact case for search
search_switch_regex: switch search type: string/regular expression
search_switch_where: switch search in messages/prefixes
search_previous: search previous line
search_next: search next line
search_stop_here: stop search at current position
search_stop: stop search
delete_previous_char: delete previous char
delete_next_char: delete next char
delete_previous_word: delete previous word
delete_next_word: delete next word
delete_beginning_of_line: delete from beginning of line until cursor
delete_end_of_line: delete from cursor until end of line
delete_line: delete entire line
clipboard_paste: paste from the internal clipboard
transpose_chars: transpose two chars
undo: undo last command line action
redo: redo last command line action
move_beginning_of_line: move cursor to beginning of line
move_end_of_line: move cursor to end of line
move_previous_char: move cursor to previous char
move_next_char: move cursor to next char
move_previous_word: move cursor to previous word
move_next_word: move cursor to next word
history_previous: recall previous command in current buffer history
history_next: recall next command in current buffer history
history_global_previous: recall previous command in global history
history_global_next: recall next command in global history
jump_smart: jump to next buffer with activity
jump_last_buffer_displayed: jump to last buffer displayed (before last jump to a buffer)
jump_previously_visited_buffer: jump to previously visited buffer
jump_next_visited_buffer: jump to next visited buffer
hotlist_clear: clear hotlist (optional argument: "lowest" to clear only lowest level in hotlist, "highest" to clear only highest level in hotlist, or level mask: integer which is a combination of 1=join/part, 2=message, 4=private, 8=highlight)
hotlist_remove_buffer: remove current buffer from hotlist
hotlist_restore_buffer: restore latest hotlist removed in the current buffer
hotlist_restore_all: restore latest hotlist removed in all buffers
grab_key: grab a key (optional argument: delay for end of grab, default is 500 milliseconds)
grab_key_command: grab a key with its associated command (optional argument: delay for end of grab, default is 500 milliseconds)
grab_mouse: grab mouse event code
grab_mouse_area: grab mouse event code with area
set_unread: set unread marker for all buffers
set_unread_current_buffer: set unread marker for current buffer
switch_active_buffer: switch to next merged buffer
switch_active_buffer_previous: switch to previous merged buffer
zoom_merged_buffer: zoom on merged buffer
insert: insert text in command line (escaped chars are allowed, see /help print)
send: send text to the buffer
paste_start: start paste (bracketed paste mode)
paste_stop: stop paste (bracketed paste mode)
листа акција:
return: симулира притисак на тастер „ентер”
complete_next: довршава реч са наредним довршавањем
complete_previous: довршава реч са претходним довршавањем
search_text_here: претражује текст у баферу почевши од текуће позиције
search_text: претражује текст у баферу
search_switch_case: укључује употребу тачне величине слова код претраге
search_switch_regex: мења тип претраге: стринг/регуларни израз
search_switch_where: укључује претрагу у порукама/префиксима
search_previous: претрага у претходној линији
search_next: претрага у наредној линији
search_stop_here: зауставља претрагу на текућој позицији
search_stop: зауставља претрагу
delete_previous_char: брише претходни карактер
delete_next_char: брише наредни карактер
delete_previous_word: брише претходну реч
delete_next_word: брише наредну реч
delete_beginning_of_line: брише од почетка линије до позиције курсора
delete_end_of_line: брише од позиције курсора до краја линије
delete_line: брише комплетну линију
clipboard_paste: налепљује из интерног клипборда
transpose_chars: транспонује два карактера (замењују места)
undo: поништава последњу акцију командне линије
redo: обнавља последње поништену акцију команде линије
move_beginning_of_line: помера курсор на почетак линије
move_end_of_line: помера курсор на крај линије
move_previous_char: помера курсор на претходни карактер
move_next_char: помера курсор на наредни карактер
move_previous_word: помера курсор на претходну реч
move_next_word: помера курсор на наредну реч
history_previous: позива претходну команду из историје команди текућег бафера
history_next: позива наредну команду из историје команди текућег бафера
history_global_previous: позива претходну команду из глобалне историје команди
history_global_next: позива наредну команду из глобалне историје команди
jump_smart: скаче на наредни бафер у коме постоји активност
jump_last_buffer_displayed: скаче на последњи приказани бафер (пре последњег скока на бафер)
jump_previously_visited_buffer: скаче на претходно посећени бафер
jump_next_visited_buffer: скаче на наредни посећени бафер
hotlist_clear: брише врућу листу (необавезни аргументи: „lowest” за брисање само најнижег нивоа у врућој листи, „highest” за брисање само највишег нивоа у врућој листи, или маска нивоа: целобројна вредност која представља комбинацију 1=join/part, 2=порука, 4=приватно, 8=истицање)
hotlist_remove_buffer: уклања текући бафер из вруће листе
hotlist_restore_buffer: враћа последњу уклоњену врућу листу у текући бафер
hotlist_restore_all: враћа последњу уклоњену врућу листу у све бафере
grab_key: преузима тастер (необавезни аргумент: кашњење за крај преузимања, подразумевано је 500 милисекунди)
grab_key_command: преузима тастер са својом придруженом командом (необавезни аргумент: кашњење за крај преузимања, подразумевано је 500 милисекунди)
grab_mouse: преузима кôд догађаја миша
grab_mouse_area: преузима кôд догађаја миша заједно са површином
set_unread: поставља маркер непрочитан за све бафере
set_unread_current_buffer: поставља маркер непрочитан за текући бафер
switch_active_buffer: прелази на наредни спојени бафер
switch_active_buffer_previous: прелази на претходни спојени бафер
zoom_merged_buffer: зумира на спојени бафер
insert: умеће текст у командну линију (дозвољени су означени карактери, погледајте /help print)
send: шаље текст баферу
paste_start: започиње налепљивање (режим ограђеног налепљивања)
paste_stop: зауставља налепљивање (режим ограђеног налепљивања)
This command is used by key bindings or plugins.
Ову команду користе тастерске пречице или додаци.
----
[[command_weechat_key]]
@ -1669,21 +1679,21 @@ listdefault: исписује подразумеване тастере
del [<име>] [buffers|windows]
rename <име> <ново_име>
store: store current buffers/windows in a layout
apply: apply stored layout
leave: leave current layout (does not update any layout)
del: delete buffers and/or windows in a stored layout
(if neither "buffers" nor "windows" is given after the name, the layout is deleted)
rename: rename a layout
name: name for stored layout (default is "default")
buffers: store/apply only buffers (order of buffers)
windows: store/apply only windows (buffer displayed by each window)
store: чува текуће бафере/прозоре у распореду
apply: примењује сачувани распоред
leave: напушта текући распоред (не ажурира ниједан распоред)
del: брише бафере и/или прозоре из сачуваног распореда
(ако након имена није наведено ни „buffers” ни „windows”, онда се брише распоред)
rename: измена имена распореда
име: име распореда који се чува (подразумевано је „default”)
buffers: чува/обнавља само бафере (редослед бафера)
windows: чува/обнавља само прозоре (бафер који приказује сваки прозор)
Without argument, this command displays stored layouts.
Без аргумента, ова команда приказује сачуване распореде.
The current layout can be saved on /quit command with the option "weechat.look.save_layout_on_exit".
Текући распоред може да се сачува приликом /quit команде опцијом „weechat.look.save_layout_on_exit”.
Note: the layout only remembers windows split and buffers numbers. It does not open buffers. That means for example you must still auto-join IRC channels to open the buffers, the saved layout only applies once the buffers are opened.
Напомена: распоред памти само поделе прозора и бројеве бафера. Он не отвара бафере. То значи да још увек морате аутоматски да приступите IRC каналима да бисте отворили бафере, сачувани распоред се примењује тек онда када се отворе бафери.
----
[[command_weechat_mouse]]

View File

@ -1847,43 +1847,43 @@
// tag::typing_options[]
* [[option_typing.look.delay_purge_paused]] *typing.look.delay_purge_paused*
** опис: pass:none[number of seconds after paused status has been set: if reached, the typing status is removed]
** опис: pass:none[број секунди након постављања статуса паузирано: ако се достигне, статус статус куцања се уклања]
** тип: целобројна
** вредности: 1 .. 2147483647
** подразумевана вредност: `+30+`
* [[option_typing.look.delay_purge_typing]] *typing.look.delay_purge_typing*
** опис: pass:none[number of seconds after typing status has been set: if reached, the typing status is removed]
** опис: pass:none[број секунди након постављања статуса куцања: ако се достигне, статус куцања се уклања]
** тип: целобројна
** вредности: 1 .. 2147483647
** подразумевана вредност: `+6+`
* [[option_typing.look.delay_set_paused]] *typing.look.delay_set_paused*
** опис: pass:none[number of seconds after typing last char: if reached, the typing status becomes "paused" and no more typing signals are sent]
** опис: pass:none[број секунди након уношења последњег карактера: ако се достигне, статус куцања постаје „паузирано” и не шаље се више ниједан сигнал куцања]
** тип: целобројна
** вредности: 1 .. 2147483647
** подразумевана вредност: `+10+`
* [[option_typing.look.enabled_nicks]] *typing.look.enabled_nicks*
** опис: pass:none[typing enabled for other nicks (display typing info for nicks typing in the current buffer)]
** опис: pass:none[куцање је укључено за остале надимке (приказује инфо о куцању за надимке из текућег бафера)]
** тип: логичка
** вредности: on, off
** подразумевана вредност: `+off+`
* [[option_typing.look.enabled_self]] *typing.look.enabled_self*
** опис: pass:none[typing enabled for self messages (send typing info to other users)]
** опис: pass:none[куцање је укључено за сопствене поруке (осталим корисницима се шаље инфо о куцању]
** тип: логичка
** вредности: on, off
** подразумевана вредност: `+off+`
* [[option_typing.look.input_min_chars]] *typing.look.input_min_chars*
** опис: pass:none[min number of chars in message to trigger send of typing signals]
** опис: pass:none[мин број карактера у поруци који окида слање сигнала о куцању]
** тип: целобројна
** вредности: 1 .. 2147483647
** подразумевана вредност: `+4+`
* [[option_typing.look.item_max_length]] *typing.look.item_max_length*
** опис: pass:none[max number of chars displayed in the bar item "typing" (0 = do not truncate content)]
** опис: pass:none[макс број карактера који се приказује у ставци траке "typing" (0 = садржај се не одсеца)]
** тип: целобројна
** вредности: 0 .. 2147483647
** подразумевана вредност: `+0+`
@ -2565,13 +2565,13 @@
** подразумевана вредност: `+off+`
* [[option_irc.look.typing_status_nicks]] *irc.look.typing_status_nicks*
** опис: pass:none[display nicks typing on the channel in bar item "typing" (option typing.look.enabled_nicks must be enabled and capability "message-tags" must be enabled on the server)]
** опис: pass:none[приказивање надимака који куцају у ставци траке „typing” (опција typing.look.enabled_nicks мора бити укључена и на серверу мора бити укључена опција „message-tags”)]
** тип: логичка
** вредности: on, off
** подразумевана вредност: `+off+`
* [[option_irc.look.typing_status_self]] *irc.look.typing_status_self*
** опис: pass:none[send self typing status to channels so that other users see when you are typing a message (option typing.look.enabled_self must be enabled and capability "message-tags" must be enabled on the server)]
** опис: pass:none[слање сопственог статуса куцања каналима тако да остали корисници виде када куцате поруку (опција typing.look.enabled_self мора бити укључена и на серверу мора бити укључена опција „message-tags”)]
** тип: логичка
** вредности: on, off
** подразумевана вредност: `+off+`

View File

@ -2565,6 +2565,58 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio
`+4+` +
`+14+`
// TRANSLATION MISSING
| `+${split:number,seps,flags,xxx}+` +
_(WeeChat ≥ 3.3)_ |
Split string, and return, according to `number`: +
- `count`: the number of items after split +
- `random`: a random item +
- integer ≥ 1: the item by index (1 = first item) +
- integer ≤ -1: the item by index from the end (-1 = last item, -2 = penultimate item, etc.), +
`seps` is a list of chars that are used as separators (if empty, a comma is used), +
`flags` is a list of flags separated by `+`: +
- `strip_left`: strip separators on the left (beginning of string) +
- `strip_right`: strip separators on the right (end of string) +
- `collapse_seps`: collapse multiple consecutive separators into a single one +
- `keep_eol`: keep end of line for each value +
- `strip_items=xyz`: strip chars `x`, `y` and `z` from beginning/end of items +
- `max_items=N`: return max N items |
`+${split:1,,,abc,def,ghi}+` +
`+${split:-1,,,abc,def,ghi}+` +
`+${split:count,,,abc,def,ghi}+` +
`+${split:random,,,abc,def,ghi}+` +
`+${split:3,,collapse_seps,abc,,,def,,,ghi}+` +
`+${split:3,,strip_items=-_,_-abc-_,_-def-_,_-ghi-_}+` +
`+${split:2, ,,this is a test}+` +
`+${split:2, ,strip_left+strip_right, this is a test }+` +
`+${split:2, ,keep_eol,this is a test}+` |
`+abc+` +
`+ghi+` +
`+3+` +
`+def+` +
`+ghi+` +
`+ghi+` +
`+is+` +
`+is+` +
`+is a test+`
// TRANSLATION MISSING
| `+${split_shell:number,xxx}+` +
_(WeeChat ≥ 3.3)_ |
Split shell arguments, and return, according to `number`: +
- `count`: the number of arguments after split +
- `random`: a random argument +
- integer ≥ 1: the argument by index (1 = first argument) +
- integer ≤ -1: the argument by index from the end (-1 = last argument, -2 = penultimate argument, etc.) |
`+${split_shell:1,"first arg" arg2}+` +
`+${split_shell:-1,"first arg" arg2}+` +
`+${split_shell:count,"first arg" arg2}+` +
`+${split_shell:random,"first arg" arg2}+` |
`+first arg+` +
`+arg2+` +
`+2+` +
`+arg2+`
| `+${re:xxx}+` +
_(WeeChat ≥ 1.1)_ |
Подаци регуларног израза: +

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-07-10 16:01+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1605,23 +1605,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1662,6 +1664,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

175
po/de.po
View File

@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-09-03 14:53+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@ -1686,6 +1686,143 @@ msgstr ""
"[-n|-s] [-d] <expression> || [-n] [-d [-d]] -c <expression1> <operator> "
"<expression2>"
#, fuzzy
#| msgid ""
#| " -n: display result without sending it to buffer (debug mode)\n"
#| " -s: split expression before evaluating it (many commands can be "
#| "separated by semicolons)\n"
#| " -d: display debug output after evaluation (with two -d: more "
#| "verbose debug)\n"
#| " -c: evaluate as condition: use operators and parentheses, return "
#| "a boolean value (\"0\" or \"1\")\n"
#| "expression: expression to evaluate, variables with format ${variable} are "
#| "replaced (see below); many commands can be separated by semicolons\n"
#| " operator: a logical or comparison operator:\n"
#| " - logical operators:\n"
#| " && boolean \"and\"\n"
#| " || boolean \"or\"\n"
#| " - comparison operators:\n"
#| " == equal\n"
#| " != not equal\n"
#| " <= less or equal\n"
#| " < less\n"
#| " >= greater or equal\n"
#| " > greater\n"
#| " =~ is matching POSIX extended regex\n"
#| " !~ is NOT matching POSIX extended regex\n"
#| " ==* is matching mask, case sensitive (wildcard \"*\" is "
#| "allowed)\n"
#| " !!* is NOT matching mask, case sensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " =* is matching mask, case insensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " !* is NOT matching mask, case insensitive (wildcard \"*"
#| "\" is allowed)\n"
#| " ==- is included, case sensitive\n"
#| " !!- is NOT included, case sensitive\n"
#| " =- is included, case insensitive\n"
#| " !- is NOT included, case insensitive\n"
#| "\n"
#| "An expression is considered as \"true\" if it is not NULL, not empty, and "
#| "different from \"0\".\n"
#| "The comparison is made using floating point numbers if the two "
#| "expressions are valid numbers, with one of the following formats:\n"
#| " - integer (examples: 5, -7)\n"
#| " - floating point number (examples: 5.2, -7.5, 2.83e-2)\n"
#| " - hexadecimal number (examples: 0xA3, -0xA3)\n"
#| "To force a string comparison, you can add double quotes around each "
#| "expression, for example:\n"
#| " 50 > 100 ==> 0\n"
#| " \"50\" > \"100\" ==> 1\n"
#| "\n"
#| "Some variables are replaced in expression, using the format ${variable}, "
#| "variable can be, by order of priority:\n"
#| " 1. the string itself without evaluation (format: \"raw:xxx\")\n"
#| " 2. an evaluated sub-string (format: \"eval:xxx\")\n"
#| " 3. an evaluated condition (format: \"eval_cond:xxx\")\n"
#| " 4. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
#| " 5. a string with chars to hide (format: \"hide:char,string\")\n"
#| " 6. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
#| "+max,suffix,string\")\n"
#| " or max chars displayed on screen (format: \"cutscr:max,suffix,string"
#| "\" or \"cutscr:+max,suffix,string\")\n"
#| " 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
#| " 8. a repeated string (format: \"repeat:count,string\")\n"
#| " 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
#| " 10. a color (format: \"color:xxx\", see \"Plugin API reference\", "
#| "function \"color\")\n"
#| " 11. a modifier (format: \"modifier:name,data,string\")\n"
#| " 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
#| " 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
#| "xxx\" or \"base_decode:base,xxx\")\n"
#| " 14. current date/time (format: \"date\" or \"date:format\")\n"
#| " 15. an environment variable (format: \"env:XXX\")\n"
#| " 16. a ternary operator (format: \"if:condition?value_if_true:"
#| "value_if_false\")\n"
#| " 17. result of an expression with parentheses and operators + - * / // % "
#| "** (format: \"calc:xxx\")\n"
#| " 18. a random integer number (format: \"random:min,max\")\n"
#| " 19. a translated string (format: \"translate:xxx\")\n"
#| " 20. an option (format: \"file.section.option\")\n"
#| " 21. a local variable in buffer\n"
#| " 22. a hdata name/variable (the value is automatically converted to "
#| "string), by default \"window\" and \"buffer\" point to current window/"
#| "buffer.\n"
#| "Format for hdata can be one of following:\n"
#| " hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
#| "variables one after one (other hdata can be followed)\n"
#| " hdata[list].var1.var2...: start with a hdata using a list/pointer/"
#| "pointer name, for example:\n"
#| " ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
#| "list of buffers\n"
#| " ${plugin[weechat_plugins].name}: name of first plugin in linked list "
#| "of plugins\n"
#| " hdata[pointer].var1.var2...: start with a hdata using a pointer, for "
#| "example:\n"
#| " ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
#| "pointer (can be used in triggers)\n"
#| " ${buffer[my_pointer].full_name}: full name of the buffer with this "
#| "pointer name (can be used in triggers)\n"
#| "For name of hdata and variables, please look at \"Plugin API reference\", "
#| "function \"weechat_hdata_get\".\n"
#| "\n"
#| "Examples (simple strings):\n"
#| " /eval -n ${raw:${info:version}} ==> ${info:version}\n"
#| " /eval -n ${eval_cond:${window.win_width}>100} ==> 1\n"
#| " /eval -n ${info:version} ==> 0.4.3\n"
#| " /eval -n ${env:HOME} ==> /home/user\n"
#| " /eval -n ${weechat.look.scroll_amount} ==> 3\n"
#| " /eval -n ${sec.data.password} ==> secret\n"
#| " /eval -n ${window} ==> 0x2549aa0\n"
#| " /eval -n ${window.buffer} ==> 0x2549320\n"
#| " /eval -n ${window.buffer.full_name} ==> core.weechat\n"
#| " /eval -n ${window.buffer.number} ==> 1\n"
#| " /eval -n ${\\t} ==> <tab>\n"
#| " /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
#| " /eval -n ${cut:3,+,test} ==> tes+\n"
#| " /eval -n ${cut:+3,+,test} ==> te+\n"
#| " /eval -n ${date:%H:%M:%S} ==> 07:46:40\n"
#| " /eval -n ${if:${info:term_width}>80?big:small} ==> big\n"
#| " /eval -n ${rev:Hello} ==> olleH\n"
#| " /eval -n ${repeat:5,-} ==> -----\n"
#| " /eval -n ${length:test} ==> 4\n"
#| " /eval -n ${calc:(5+2)*3} ==> 21\n"
#| " /eval -n ${random:0,10} ==> 3\n"
#| " /eval -n ${base_encode:64,test} ==> dGVzdA==\n"
#| " /eval -n ${base_decode:64,dGVzdA==} ==> test\n"
#| " /eval -n ${translate:Plugin} ==> Extension\n"
#| "\n"
#| "Examples (conditions):\n"
#| " /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
#| " /eval -n -c ${window.win_width} > 100 ==> 1\n"
#| " /eval -n -c (8 > 12) || (5 > 2) ==> 1\n"
#| " /eval -n -c (8 > 12) && (5 > 2) ==> 0\n"
#| " /eval -n -c abcd =~ ^ABC ==> 1\n"
#| " /eval -n -c abcd =~ (?-i)^ABC ==> 0\n"
#| " /eval -n -c abcd =~ (?-i)^abc ==> 1\n"
#| " /eval -n -c abcd !~ abc ==> 0\n"
#| " /eval -n -c abcd =* a*d ==> 1\n"
#| " /eval -n -c abcd =- bc ==> 1"
msgid ""
" -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be "
@ -1748,23 +1885,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1805,6 +1944,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-07-10 16:01+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1633,23 +1633,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1690,6 +1692,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"PO-Revision-Date: 2021-08-31 22:38+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-09-06 13:30+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -1721,23 +1721,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1778,6 +1780,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"
@ -1861,24 +1871,27 @@ msgstr ""
" 7. une chaîne inversée (format : \"rev:xxx\" ou \"revscr:xxx\")\n"
" 8. une chaîne répétée (format : \"repeat:nombre,chaîne\")\n"
" 9. longueur d'une chaîne (format : \"length:xxx\" ou \"lengthscr:xxx\")\n"
" 10. une couleur (format : \"color:xxx\", voir la \"Référence API extension"
" 10. découpage d'une chaîne (format : \"split:nombre,séparateurs,flags,xxx"
"\")\n"
" 11. découpage de paramètres shell (format : \"split_shell:nombre,xxx\")\n"
" 12. une couleur (format : \"color:xxx\", voir la \"Référence API extension"
"\", fonction \"color\")\n"
" 11. un modificateur (format : \"modifier:nom,données,chaîne\")\n"
" 12. une info (format : \"info:nom,paramètres\", les paramètres sont "
" 13. un modificateur (format : \"modifier:nom,données,chaîne\")\n"
" 14. une info (format : \"info:nom,paramètres\", les paramètres sont "
"optionnels)\n"
" 13. une chaîne encodée/decodée en base 16, 32 ou 64 (format : "
" 15. une chaîne encodée/decodée en base 16, 32 ou 64 (format : "
"\"base_encode:base,xxx\" ou \"base_decode:base,xxx\")\n"
" 14. la date/heure courante (format : \"date\" ou \"date:format\")\n"
" 15. une variable d'environnement (format : \"env:XXX\")\n"
" 16. un opérateur ternaire (format : \"if:condition?valeur_si_vrai:"
" 16. la date/heure courante (format : \"date\" ou \"date:format\")\n"
" 17. une variable d'environnement (format : \"env:XXX\")\n"
" 18. un opérateur ternaire (format : \"if:condition?valeur_si_vrai:"
"valeur_si_faux\")\n"
" 17. le résultat d'une expression avec parenthèses et les opérateurs + - "
" 19. le résultat d'une expression avec parenthèses et les opérateurs + - "
"* / // % ** (format: \"calc:xxx\")\n"
" 18. un nombre entier aléatoire (format : \"random:min,max\")\n"
" 19. une chaîne traduite (format : \"translate:xxx\")\n"
" 20. une option (format : \"fichier.section.option\")\n"
" 21. une variable locale du tampon\n"
" 22. un hdata/variable (la valeur est automatiquement convertie en chaîne), "
" 20. un nombre entier aléatoire (format : \"random:min,max\")\n"
" 21. une chaîne traduite (format : \"translate:xxx\")\n"
" 22. une option (format : \"fichier.section.option\")\n"
" 23. une variable locale du tampon\n"
" 24. un hdata/variable (la valeur est automatiquement convertie en chaîne), "
"par défaut \"window\" et \"buffer\" pointent vers la fenêtre et le tampon "
"courants.\n"
"Le format du hdata peut être le suivant :\n"
@ -1920,6 +1933,14 @@ msgstr ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\\\"arg 1\\\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\\\"arg 1\\\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\\\"arg 1\\\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\\\"arg 1\\\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-07-10 16:01+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1520,23 +1520,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1577,6 +1579,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-07-10 16:01+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1616,23 +1616,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1673,6 +1675,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-07-10 16:01+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -1700,23 +1700,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1757,6 +1759,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-07-10 16:01+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@ -1850,23 +1850,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1907,6 +1909,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-07-10 16:01+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@ -1704,23 +1704,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1761,6 +1763,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-07-10 16:01+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1679,23 +1679,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1736,6 +1738,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-07-10 16:01+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1543,23 +1543,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1600,6 +1602,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

229
po/sr.po
View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-09-01 02:38+0400\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1638,6 +1638,143 @@ msgid ""
"<expression2>"
msgstr "[-n|-s] [-d] <израз> || [-n] [-d [-d]] -c <израз1> <оператор> <израз2>"
#, fuzzy
#| msgid ""
#| " -n: display result without sending it to buffer (debug mode)\n"
#| " -s: split expression before evaluating it (many commands can be "
#| "separated by semicolons)\n"
#| " -d: display debug output after evaluation (with two -d: more "
#| "verbose debug)\n"
#| " -c: evaluate as condition: use operators and parentheses, return "
#| "a boolean value (\"0\" or \"1\")\n"
#| "expression: expression to evaluate, variables with format ${variable} are "
#| "replaced (see below); many commands can be separated by semicolons\n"
#| " operator: a logical or comparison operator:\n"
#| " - logical operators:\n"
#| " && boolean \"and\"\n"
#| " || boolean \"or\"\n"
#| " - comparison operators:\n"
#| " == equal\n"
#| " != not equal\n"
#| " <= less or equal\n"
#| " < less\n"
#| " >= greater or equal\n"
#| " > greater\n"
#| " =~ is matching POSIX extended regex\n"
#| " !~ is NOT matching POSIX extended regex\n"
#| " ==* is matching mask, case sensitive (wildcard \"*\" is "
#| "allowed)\n"
#| " !!* is NOT matching mask, case sensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " =* is matching mask, case insensitive (wildcard \"*\" "
#| "is allowed)\n"
#| " !* is NOT matching mask, case insensitive (wildcard \"*"
#| "\" is allowed)\n"
#| " ==- is included, case sensitive\n"
#| " !!- is NOT included, case sensitive\n"
#| " =- is included, case insensitive\n"
#| " !- is NOT included, case insensitive\n"
#| "\n"
#| "An expression is considered as \"true\" if it is not NULL, not empty, and "
#| "different from \"0\".\n"
#| "The comparison is made using floating point numbers if the two "
#| "expressions are valid numbers, with one of the following formats:\n"
#| " - integer (examples: 5, -7)\n"
#| " - floating point number (examples: 5.2, -7.5, 2.83e-2)\n"
#| " - hexadecimal number (examples: 0xA3, -0xA3)\n"
#| "To force a string comparison, you can add double quotes around each "
#| "expression, for example:\n"
#| " 50 > 100 ==> 0\n"
#| " \"50\" > \"100\" ==> 1\n"
#| "\n"
#| "Some variables are replaced in expression, using the format ${variable}, "
#| "variable can be, by order of priority:\n"
#| " 1. the string itself without evaluation (format: \"raw:xxx\")\n"
#| " 2. an evaluated sub-string (format: \"eval:xxx\")\n"
#| " 3. an evaluated condition (format: \"eval_cond:xxx\")\n"
#| " 4. a string with escaped chars (format: \"esc:xxx\" or \"\\xxx\")\n"
#| " 5. a string with chars to hide (format: \"hide:char,string\")\n"
#| " 6. a string with max chars (format: \"cut:max,suffix,string\" or \"cut:"
#| "+max,suffix,string\")\n"
#| " or max chars displayed on screen (format: \"cutscr:max,suffix,string"
#| "\" or \"cutscr:+max,suffix,string\")\n"
#| " 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
#| " 8. a repeated string (format: \"repeat:count,string\")\n"
#| " 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
#| " 10. a color (format: \"color:xxx\", see \"Plugin API reference\", "
#| "function \"color\")\n"
#| " 11. a modifier (format: \"modifier:name,data,string\")\n"
#| " 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
#| " 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,"
#| "xxx\" or \"base_decode:base,xxx\")\n"
#| " 14. current date/time (format: \"date\" or \"date:format\")\n"
#| " 15. an environment variable (format: \"env:XXX\")\n"
#| " 16. a ternary operator (format: \"if:condition?value_if_true:"
#| "value_if_false\")\n"
#| " 17. result of an expression with parentheses and operators + - * / // % "
#| "** (format: \"calc:xxx\")\n"
#| " 18. a random integer number (format: \"random:min,max\")\n"
#| " 19. a translated string (format: \"translate:xxx\")\n"
#| " 20. an option (format: \"file.section.option\")\n"
#| " 21. a local variable in buffer\n"
#| " 22. a hdata name/variable (the value is automatically converted to "
#| "string), by default \"window\" and \"buffer\" point to current window/"
#| "buffer.\n"
#| "Format for hdata can be one of following:\n"
#| " hdata.var1.var2...: start with a hdata (pointer must be known), and ask "
#| "variables one after one (other hdata can be followed)\n"
#| " hdata[list].var1.var2...: start with a hdata using a list/pointer/"
#| "pointer name, for example:\n"
#| " ${buffer[gui_buffers].full_name}: full name of first buffer in linked "
#| "list of buffers\n"
#| " ${plugin[weechat_plugins].name}: name of first plugin in linked list "
#| "of plugins\n"
#| " hdata[pointer].var1.var2...: start with a hdata using a pointer, for "
#| "example:\n"
#| " ${buffer[0x1234abcd].full_name}: full name of the buffer with this "
#| "pointer (can be used in triggers)\n"
#| " ${buffer[my_pointer].full_name}: full name of the buffer with this "
#| "pointer name (can be used in triggers)\n"
#| "For name of hdata and variables, please look at \"Plugin API reference\", "
#| "function \"weechat_hdata_get\".\n"
#| "\n"
#| "Examples (simple strings):\n"
#| " /eval -n ${raw:${info:version}} ==> ${info:version}\n"
#| " /eval -n ${eval_cond:${window.win_width}>100} ==> 1\n"
#| " /eval -n ${info:version} ==> 0.4.3\n"
#| " /eval -n ${env:HOME} ==> /home/user\n"
#| " /eval -n ${weechat.look.scroll_amount} ==> 3\n"
#| " /eval -n ${sec.data.password} ==> secret\n"
#| " /eval -n ${window} ==> 0x2549aa0\n"
#| " /eval -n ${window.buffer} ==> 0x2549320\n"
#| " /eval -n ${window.buffer.full_name} ==> core.weechat\n"
#| " /eval -n ${window.buffer.number} ==> 1\n"
#| " /eval -n ${\\t} ==> <tab>\n"
#| " /eval -n ${hide:-,${relay.network.password}} ==> --------\n"
#| " /eval -n ${cut:3,+,test} ==> tes+\n"
#| " /eval -n ${cut:+3,+,test} ==> te+\n"
#| " /eval -n ${date:%H:%M:%S} ==> 07:46:40\n"
#| " /eval -n ${if:${info:term_width}>80?big:small} ==> big\n"
#| " /eval -n ${rev:Hello} ==> olleH\n"
#| " /eval -n ${repeat:5,-} ==> -----\n"
#| " /eval -n ${length:test} ==> 4\n"
#| " /eval -n ${calc:(5+2)*3} ==> 21\n"
#| " /eval -n ${random:0,10} ==> 3\n"
#| " /eval -n ${base_encode:64,test} ==> dGVzdA==\n"
#| " /eval -n ${base_decode:64,dGVzdA==} ==> test\n"
#| " /eval -n ${translate:Plugin} ==> Extension\n"
#| "\n"
#| "Examples (conditions):\n"
#| " /eval -n -c ${window.buffer.number} > 2 ==> 0\n"
#| " /eval -n -c ${window.win_width} > 100 ==> 1\n"
#| " /eval -n -c (8 > 12) || (5 > 2) ==> 1\n"
#| " /eval -n -c (8 > 12) && (5 > 2) ==> 0\n"
#| " /eval -n -c abcd =~ ^ABC ==> 1\n"
#| " /eval -n -c abcd =~ (?-i)^ABC ==> 0\n"
#| " /eval -n -c abcd =~ (?-i)^abc ==> 1\n"
#| " /eval -n -c abcd !~ abc ==> 0\n"
#| " /eval -n -c abcd =* a*d ==> 1\n"
#| " /eval -n -c abcd =- bc ==> 1"
msgid ""
" -n: display result without sending it to buffer (debug mode)\n"
" -s: split expression before evaluating it (many commands can be "
@ -1700,23 +1837,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1757,6 +1896,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"
@ -2417,8 +2564,8 @@ msgstr ""
"\n"
"Напомена: распоред памти само поделе прозора и бројеве бафера. Он не отвара "
"бафере. То значи да још увек морате аутоматски да приступите IRC каналима да "
"бисте отворили бафере, сачувани распоред се примењује тек онда када се отворе "
"бафери."
"бисте отворили бафере, сачувани распоред се примењује тек онда када се "
"отворе бафери."
msgid "mouse control"
msgstr "контрола миша"
@ -7864,8 +8011,8 @@ msgid ""
"[-current] [-parted] [-exclude=<channel>[,<channel>...]] <command> || [-"
"current] [-parted] -include=<channel>[,<channel>...] <command>"
msgstr ""
"[-current] [-parted] [-exclude=<канал>[,<канал>...]] <команда> || "
"[-current] [-parted] -include=<канал>[,<канал>...] <команда>"
"[-current] [-parted] [-exclude=<канал>[,<канал>...]] <команда> || [-current] "
"[-parted] -include=<канал>[,<канал>...] <команда>"
msgid ""
" -current: execute command for channels of current server only\n"
@ -8061,14 +8208,14 @@ msgid ""
" /auth user2 ${weechat_config_dir}/ecdsa2.pem"
msgstr ""
ор_име: SASL корисничко име (садржај се израчунава, погледајте /help eval; "
"опције сервера се израчунавају са ${irc_server.xxx} и ${server} се замењује са "
"именом сервера)\n"
"опције сервера се израчунавају са ${irc_server.xxx} и ${server} се замењује "
"са именом сервера)\n"
"лозинка: SASL лозинка или путања до фајла са приватним кључем (садржај се "
"израчунава, погледајте /help eval; опције сервера се израчунавају са "
"${irc_server.xxx} и ${server} се замњеује именом сервера)\n"
"\n"
"Ако се не наведу корисничко име и лозинка, користе се вредности из серверских "
"опције „sasl_username” и „sasl_password” (или „sasl_key”).\n"
"Ако се не наведу корисничко име и лозинка, користе се вредности из "
"серверских опције „sasl_username” и „sasl_password” (или „sasl_key”).\n"
"\n"
"Примери:\n"
" аутентификација са корисничким именом/лозинком дефинисаним на серверу:\n"
@ -10204,8 +10351,8 @@ msgid ""
"look.enabled_nicks must be enabled and capability \"message-tags\" must be "
"enabled on the server)"
msgstr ""
"приказивање надимака који куцају у ставци траке „typing” (опција typing."
"look.enabled_nicks мора бити укључена и на серверу мора бити укључена опција "
"приказивање надимака који куцају у ставци траке „typing” (опција typing.look."
"enabled_nicks мора бити укључена и на серверу мора бити укључена опција "
"„message-tags”)"
msgid ""
@ -10214,8 +10361,8 @@ msgid ""
"capability \"message-tags\" must be enabled on the server)"
msgstr ""
"слање сопственог статуса куцања каналима тако да остали корисници виде када "
"куцате поруку (опција typing.look.enabled_self мора бити укључена и на серверу "
"мора бити укључена опција „message-tags”)"
"куцате поруку (опција typing.look.enabled_self мора бити укључена и на "
"серверу мора бити укључена опција „message-tags”)"
msgid ""
"merge server buffers; this option has no effect if a layout is saved and is "
@ -10606,15 +10753,15 @@ msgid ""
"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
"„tags”: ознаке, „tag_xxx”: неозначена вредност ознаке „xxx” (један кључ "
"по ознаци), „message_without_tags”: поруке без ознака, „nick”: надимак, "
"„user”: корисник, „host”: хост, „command”: команда, „channel”: канал, "
"„arguments”: аргументи (укључујући channel), „text”: текст (на пример, "
"корисничка порука), „pos_command”: индекс „command” поруке („-1” ако "
"„command” није пронађена), „pos_arguments”: индекс „arguments” поруке "
"(„-1” ако „arguments” није пронађена), „pos_channel”: индекс „channel” "
"поруке („-1” ако „channel” није пронађена), „pos_text”: индекс „text” "
"поруке („-1” ако „text” није пронађена)"
"„tags”: ознаке, „tag_xxx”: неозначена вредност ознаке „xxx” (један кључ по "
"ознаци), „message_without_tags”: поруке без ознака, „nick”: надимак, „user”: "
"корисник, „host”: хост, „command”: команда, „channel”: канал, „arguments”: "
"аргументи (укључујући channel), „text”: текст (на пример, корисничка "
"порука), „pos_command”: индекс „command” поруке („-1” ако „command” није "
"пронађена), „pos_arguments”: индекс „arguments” поруке („-1” ако „arguments” "
"није пронађена), „pos_channel”: индекс „channel” поруке („-1” ако „channel” "
"није пронађена), „pos_text”: индекс „text” поруке („-1” ако „text” није "
"пронађена)"
msgid "split an IRC message (to fit in 512 bytes by default)"
msgstr "подела IRC поруке (подразумевано тако да стане у 512 бајтова)"
@ -14726,8 +14873,8 @@ msgid ""
"number of seconds after typing status has been set: if reached, the typing "
"status is removed"
msgstr ""
"број секунди након постављања статуса куцања: ако се достигне, статус "
"куцања се уклања"
"број секунди након постављања статуса куцања: ако се достигне, статус куцања "
"се уклања"
msgid ""
"number of seconds after typing last char: if reached, the typing status "
@ -14745,8 +14892,8 @@ msgstr ""
msgid "typing enabled for self messages (send typing info to other users)"
msgstr ""
"куцање је укључено за сопствене поруке (осталим корисницима се шаље "
"инфо о куцању"
"куцање је укључено за сопствене поруке (осталим корисницима се шаље инфо о "
"куцању"
msgid "min number of chars in message to trigger send of typing signals"
msgstr "мин број карактера у поруци који окида слање сигнала о куцању"
@ -14755,8 +14902,8 @@ msgid ""
"max number of chars displayed in the bar item \"typing\" (0 = do not "
"truncate content)"
msgstr ""
"макс број карактера који се приказује у ставци траке \"typing\" (0 = "
"садржај се не одсеца)"
"макс број карактера који се приказује у ставци траке \"typing\" (0 = садржај "
"се не одсеца)"
msgid " [A] Accept"
msgstr " [A] Прихвати"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+0200\n"
"PO-Revision-Date: 2021-07-10 16:01+0200\n"
"Last-Translator: Emir SARI <bitigchi@me.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1689,23 +1689,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1746,6 +1748,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2021-08-31 22:27+0200\n"
"POT-Creation-Date: 2021-09-06 13:29+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"
@ -1377,23 +1377,25 @@ msgid ""
" 7. a reversed string (format: \"rev:xxx\" or \"revscr:xxx\")\n"
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or \"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
" 10. split of a string (format: \"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API reference\", function "
"\"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are optional)\n"
" 15. a base 16/32/64 encoded/decoded string (format: \"base_encode:base,xxx"
"\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: \"if:condition?value_if_true:value_if_false"
"\")\n"
" 17. result of an expression with parentheses and operators + - * / // % ** "
" 19. result of an expression with parentheses and operators + - * / // % ** "
"(format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted to "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted to "
"string), by default \"window\" and \"buffer\" point to current window/"
"buffer.\n"
"Format for hdata can be one of following:\n"
@ -1434,6 +1436,14 @@ msgid ""
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -7579,24 +7579,27 @@ command_init ()
" 8. a repeated string (format: \"repeat:count,string\")\n"
" 9. length of a string (format: \"length:xxx\" or "
"\"lengthscr:xxx\")\n"
" 10. a color (format: \"color:xxx\", see \"Plugin API "
" 10. split of a string (format: "
"\"split:number,separators,flags,xxx\")\n"
" 11. split of shell argmuents (format: \"split_shell:number,xxx\")\n"
" 12. a color (format: \"color:xxx\", see \"Plugin API "
"reference\", function \"color\")\n"
" 11. a modifier (format: \"modifier:name,data,string\")\n"
" 12. an info (format: \"info:name,arguments\", arguments are "
" 13. a modifier (format: \"modifier:name,data,string\")\n"
" 14. an info (format: \"info:name,arguments\", arguments are "
"optional)\n"
" 13. a base 16/32/64 encoded/decoded string (format: "
" 15. a base 16/32/64 encoded/decoded string (format: "
"\"base_encode:base,xxx\" or \"base_decode:base,xxx\")\n"
" 14. current date/time (format: \"date\" or \"date:format\")\n"
" 15. an environment variable (format: \"env:XXX\")\n"
" 16. a ternary operator (format: "
" 16. current date/time (format: \"date\" or \"date:format\")\n"
" 17. an environment variable (format: \"env:XXX\")\n"
" 18. a ternary operator (format: "
"\"if:condition?value_if_true:value_if_false\")\n"
" 17. result of an expression with parentheses and operators "
" 19. result of an expression with parentheses and operators "
"+ - * / // % ** (format: \"calc:xxx\")\n"
" 18. a random integer number (format: \"random:min,max\")\n"
" 19. a translated string (format: \"translate:xxx\")\n"
" 20. an option (format: \"file.section.option\")\n"
" 21. a local variable in buffer\n"
" 22. a hdata name/variable (the value is automatically converted "
" 20. a random integer number (format: \"random:min,max\")\n"
" 21. a translated string (format: \"translate:xxx\")\n"
" 22. an option (format: \"file.section.option\")\n"
" 23. a local variable in buffer\n"
" 24. a hdata name/variable (the value is automatically converted "
"to string), by default \"window\" and \"buffer\" point to current "
"window/buffer.\n"
"Format for hdata can be one of following:\n"
@ -7637,6 +7640,14 @@ command_init ()
" /eval -n ${rev:Hello} ==> olleH\n"
" /eval -n ${repeat:5,-} ==> -----\n"
" /eval -n ${length:test} ==> 4\n"
" /eval -n ${split:1,,,abc,def,ghi} ==> abc\n"
" /eval -n ${split:-1,,,abc,def,ghi} ==> ghi\n"
" /eval -n ${split:count,,,abc,def,ghi} ==> 3\n"
" /eval -n ${split:random,,,abc,def,ghi} ==> def\n"
" /eval -n ${split_shell:1,\"arg 1\" arg2} ==> arg 1\n"
" /eval -n ${split_shell:-1,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${split_shell:count,\"arg 1\" arg2} ==> 2\n"
" /eval -n ${split_shell:random,\"arg 1\" arg2} ==> arg2\n"
" /eval -n ${calc:(5+2)*3} ==> 21\n"
" /eval -n ${random:0,10} ==> 3\n"
" /eval -n ${base_encode:64,test} ==> dGVzdA==\n"

View File

@ -401,6 +401,269 @@ eval_string_repeat (const char *text)
return string_repeat (pos + 1, number);
}
/*
* Splits string.
*
* Format: number,separators,flags,string
*
* If number == "count", returns the number of items after split.
* If number == "random", returns a random item.
* If number > 0, return this index (empty string if not enough items).
* If number < 0, return this index starting from the end (-1 = last item,
* -2 = penultimate item, etc.).
*
* If separators is empty string, a comma is used by default.
*
* Flags is a list of flags, separated by "+":
* strip_left
* strip_right
* collapse_seps
* keep_eol
* strip_items=xyz
* max_items=N
*
* Examples:
* ${split:1,,,abc,def,ghi} ==> abc
* ${split:-1,,,abc,def,ghi} ==> ghi
* ${split:count,,,abc,def,ghi} ==> 3
* ${split:random,,,abc,def,ghi} ==> def
* ${split:3,,collapse_seps,abc,,,def,,,ghi} ==> ghi
* ${split:3,,strip_items=-_,_-abc-_,_-def-_,_-ghi-_} ==> ghi
* ${split:2, ,,this is a test} ==> is
* ${split:2, ,strip_left+strip_right, this is a test } ==> is
* ${split:2, ,keep_eol,this is a test} ==> is a test
*
* Note: result must be freed after use.
*/
char *
eval_string_split (const char *text)
{
char *pos, *pos2, *pos3, *str_number, *separators, **items, *value, *error;
char str_value[32], *str_flags, **list_flags, *strip_items;
int i, num_items, count_items, random_item, flags;
long number, max_items;
str_number = NULL;
separators = NULL;
items = NULL;
value = NULL;
str_flags = NULL;
list_flags = NULL;
strip_items = NULL;
count_items = 0;
random_item = 0;
flags = 0;
max_items = 0;
if (!text || !text[0])
goto end;
pos = strchr (text, ',');
if (!pos || (pos == text))
goto end;
number = 0;
str_number = string_strndup (text, pos - text);
if (strcmp (str_number, "count") == 0)
{
count_items = 1;
}
else if (strcmp (str_number, "random") == 0)
{
random_item = 1;
}
else
{
number = strtol (str_number, &error, 10);
if (!error || error[0] || (number == 0))
goto end;
}
pos++;
pos2 = strchr (pos, ',');
if (!pos2)
goto end;
if (pos2 == pos)
separators = strdup (",");
else
separators = string_strndup (pos, pos2 - pos);
pos2++;
pos3 = strchr (pos2, ',');
if (!pos3)
goto end;
str_flags = string_strndup (pos2, pos3 - pos2);
list_flags = string_split (str_flags, "+", NULL, 0, 0, NULL);
if (list_flags)
{
for (i = 0; list_flags[i]; i++)
{
if (strcmp (list_flags[i], "strip_left") == 0)
flags |= WEECHAT_STRING_SPLIT_STRIP_LEFT;
else if (strcmp (list_flags[i], "strip_right") == 0)
flags |= WEECHAT_STRING_SPLIT_STRIP_RIGHT;
else if (strcmp (list_flags[i], "collapse_seps") == 0)
flags |= WEECHAT_STRING_SPLIT_COLLAPSE_SEPS;
else if (strcmp (list_flags[i], "keep_eol") == 0)
flags |= WEECHAT_STRING_SPLIT_KEEP_EOL;
else if (strncmp (list_flags[i], "strip_items=", 12) == 0)
strip_items = strdup (list_flags[i] + 12);
else if (strncmp (list_flags[i], "max_items=", 10) == 0)
{
max_items = strtol (list_flags[i] + 10, &error, 10);
if (!error || error[0] || (max_items < 0))
goto end;
}
}
}
pos3++;
items = string_split (pos3, separators, strip_items, flags,
max_items, &num_items);
/* if "count" was asked, return the number of items found after split */
if (count_items)
{
snprintf (str_value, sizeof (str_value), "%d", num_items);
value = strdup (str_value);
goto end;
}
if (!items || (num_items < 1))
goto end;
/* if "random" was asked, return a random item */
if (random_item)
number = random () % num_items;
else if (number > 0)
number--;
if (((number >= 0) && (number >= num_items))
|| ((number < 0) && (labs (number) > num_items)))
{
goto end;
}
if (number < 0)
number = num_items + number;
value = strdup (items[number]);
end:
if (str_number)
free (str_number);
if (separators)
free (separators);
if (str_flags)
free (str_flags);
if (list_flags)
string_free_split (list_flags);
if (strip_items)
free (strip_items);
if (items)
string_free_split (items);
return (value) ? value : strdup ("");
}
/*
* Splits shell arguments.
*
* Format: number,string
*
* If number == "count", returns the number of arguments.
* If number == "random", returns a random argument.
* If number > 0, return this index (empty string if not enough arguments).
* If number < 0, return this index starting from the end (-1 = last argument,
* -2 = penultimate argument, etc.).
*
* Examples:
* ${split_shell:count,"arg 1" arg2} ==> "2"
* ${split_shell:random,"arg 1" arg2} ==> "arg2"
* ${split_shell:1,"arg 1" arg2} ==> "arg 1"
* ${split_shell:-1,"arg 1" arg2} ==> "arg2"
*
* Note: result must be freed after use.
*/
char *
eval_string_split_shell (const char *text)
{
char *pos, *str_number, **items, *value, *error, str_value[32];
int num_items, count_items, random_item;
long number;
str_number = NULL;
items = NULL;
value = NULL;
count_items = 0;
random_item = 0;
if (!text || !text[0])
goto end;
pos = strchr (text, ',');
if (!pos || (pos == text))
goto end;
number = 0;
str_number = string_strndup (text, pos - text);
if (strcmp (str_number, "count") == 0)
{
count_items = 1;
}
else if (strcmp (str_number, "random") == 0)
{
random_item = 1;
}
else
{
number = strtol (str_number, &error, 10);
if (!error || error[0] || (number == 0))
goto end;
}
pos++;
items = string_split_shell (pos, &num_items);
/* if "count" was asked, return the number of items found after split */
if (count_items)
{
snprintf (str_value, sizeof (str_value), "%d", num_items);
value = strdup (str_value);
goto end;
}
if (!items || (num_items < 1))
goto end;
/* if "random" was asked, return a random item */
if (random_item)
number = random () % num_items;
else if (number > 0)
number--;
if (((number >= 0) && (number >= num_items))
|| ((number < 0) && (labs (number) > num_items)))
{
goto end;
}
if (number < 0)
number = num_items + number;
value = strdup (items[number]);
end:
if (str_number)
free (str_number);
if (items)
string_free_split (items);
return (value) ? value : strdup ("");
}
/*
* Returns a regex group captured.
*
@ -1104,23 +1367,28 @@ end:
* 10. a repeated string (format: repeat:count,string)
* 11. length of a string (format: length:xxx) or length of a string on screen
* (format: lengthscr:xxx); color codes are ignored
* 12. a regex group captured (format: re:N (0.99) or re:+)
* 13. a color (format: color:xxx)
* 14. a modifier (format: modifier:name,data,xxx)
* 15. an info (format: info:name,arguments)
* 16. a base 16/32/64 encoded/decoded string (format: base_encode:base,xxx
* 12. split string (format: split:number,separators,flags,xxx
* or split:count,separators,flags,xxx
* or split:random,separators,flags,xxx)
* 13. split shell arguments (format: split:number,xxx or split:count,xxx
* or split:random,xxx)
* 14. a regex group captured (format: re:N (0.99) or re:+)
* 15. a color (format: color:xxx)
* 16. a modifier (format: modifier:name,data,xxx)
* 17. an info (format: info:name,arguments)
* 18. a base 16/32/64 encoded/decoded string (format: base_encode:base,xxx
* or base_decode:base,xxx)
* 17. current date/time (format: date or date:xxx)
* 18. an environment variable (format: env:XXX)
* 19. a ternary operator (format: if:condition?value_if_true:value_if_false)
* 20. calculate result of an expression (format: calc:xxx)
* 21. a random integer number in the range from "min" to "max"
* 19. current date/time (format: date or date:xxx)
* 20. an environment variable (format: env:XXX)
* 21. a ternary operator (format: if:condition?value_if_true:value_if_false)
* 22. calculate result of an expression (format: calc:xxx)
* 23. a random integer number in the range from "min" to "max"
* (format: random:min,max)
* 22. a translated string (format: translate:xxx)
* 23. an option (format: file.section.option)
* 24. a buffer local variable
* 25. a pointer name from hashtable "pointers"
* 26. a hdata variable (format: hdata.var1.var2 or hdata[list].var1.var2
* 24. a translated string (format: translate:xxx)
* 25. an option (format: file.section.option)
* 26. a buffer local variable
* 27. a pointer name from hashtable "pointers"
* 28. a hdata variable (format: hdata.var1.var2 or hdata[list].var1.var2
* or hdata[ptr].var1.var2 or hdata[ptr_name].var1.var2)
*
* See /help in WeeChat for examples.
@ -1296,35 +1564,49 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 12. regex group captured */
/* 12: split string */
if (strncmp (text, "split:", 6) == 0)
{
value = eval_string_split (text + 6);
goto end;
}
/* 13: split shell */
if (strncmp (text, "split_shell:", 12) == 0)
{
value = eval_string_split_shell (text + 12);
goto end;
}
/* 14. regex group captured */
if (strncmp (text, "re:", 3) == 0)
{
value = eval_string_regex_group (text + 3, eval_context);
goto end;
}
/* 13. color code */
/* 15. color code */
if (strncmp (text, "color:", 6) == 0)
{
value = eval_string_color (text + 6);
goto end;
}
/* 14. modifier */
/* 16. modifier */
if (strncmp (text, "modifier:", 9) == 0)
{
value = eval_string_modifier (text + 9);
goto end;
}
/* 15. info */
/* 17. info */
if (strncmp (text, "info:", 5) == 0)
{
value = eval_string_info (text + 5);
goto end;
}
/* 16. base_encode/base_decode */
/* 18. base_encode/base_decode */
if (strncmp (text, "base_encode:", 12) == 0)
{
value = eval_string_base_encode (text + 12);
@ -1336,14 +1618,14 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 17. current date/time */
/* 19. current date/time */
if ((strncmp (text, "date", 4) == 0) && (!text[4] || (text[4] == ':')))
{
value = eval_string_date (text + 4);
goto end;
}
/* 18. environment variable */
/* 20. environment variable */
if (strncmp (text, "env:", 4) == 0)
{
ptr_value = getenv (text + 4);
@ -1351,7 +1633,7 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 19: ternary operator: if:condition?value_if_true:value_if_false */
/* 21: ternary operator: if:condition?value_if_true:value_if_false */
if (strncmp (text, "if:", 3) == 0)
{
value = eval_string_if (text + 3, eval_context);
@ -1359,7 +1641,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
/*
* 20. calculate the result of an expression
* 22. calculate the result of an expression
* (with number, operators and parentheses)
*/
if (strncmp (text, "calc:", 5) == 0)
@ -1369,7 +1651,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
/*
* 21. random number
* 23. random number
*/
if (strncmp (text, "random:", 7) == 0)
{
@ -1378,7 +1660,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
/*
* 22. translated text
* 24. translated text
*/
if (strncmp (text, "translate:", 10) == 0)
{
@ -1386,7 +1668,7 @@ eval_replace_vars_cb (void *data, const char *text)
goto end;
}
/* 22. option: if found, return this value */
/* 25. option: if found, return this value */
if (strncmp (text, "sec.data.", 9) == 0)
{
ptr_value = hashtable_get (secure_hashtable_data, text + 9);
@ -1429,7 +1711,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
}
/* 23. local variable in buffer */
/* 26. local variable in buffer */
ptr_buffer = hashtable_get (eval_context->pointers, "buffer");
if (ptr_buffer)
{
@ -1441,7 +1723,7 @@ eval_replace_vars_cb (void *data, const char *text)
}
}
/* 24. hdata */
/* 27. hdata */
value = eval_string_hdata (text, eval_context);
end:

View File

@ -648,6 +648,85 @@ TEST(CoreEval, EvalExpression)
WEE_CHECK_EVAL("14", "${lengthscr:こんにちは世界}");
WEE_CHECK_EVAL("14", "${lengthscr:${color:green}こんにちは世界}");
/* test split of string */
WEE_CHECK_EVAL("", "${split:}");
WEE_CHECK_EVAL("", "${split:1}");
WEE_CHECK_EVAL("", "${split:1,}");
WEE_CHECK_EVAL("", "${split:1,,}");
WEE_CHECK_EVAL("", "${split:count}");
WEE_CHECK_EVAL("", "${split:count,}");
WEE_CHECK_EVAL("", "${split:count,,}");
WEE_CHECK_EVAL("0", "${split:count,,,}");
WEE_CHECK_EVAL("abc", "${split:random,,,abc}");
WEE_CHECK_EVAL("", "${split:0,,,abc,def,ghi}");
WEE_CHECK_EVAL("abc", "${split:1,,,abc}");
WEE_CHECK_EVAL("abc", "${split:1,,,abc,def}");
WEE_CHECK_EVAL("abc", "${split:1,,,abc,def,ghi}");
WEE_CHECK_EVAL("def", "${split:2,,,abc,def,ghi}");
WEE_CHECK_EVAL("ghi", "${split:3,,,abc,def,ghi}");
WEE_CHECK_EVAL("", "${split:4,,,abc,def,ghi}");
WEE_CHECK_EVAL("ghi", "${split:-1,,,abc,def,ghi}");
WEE_CHECK_EVAL("def", "${split:-2,,,abc,def,ghi}");
WEE_CHECK_EVAL("abc", "${split:-3,,,abc,def,ghi}");
WEE_CHECK_EVAL("", "${split:-4,,,abc,def,ghi}");
WEE_CHECK_EVAL("3", "${split:count,,,abc,def,ghi}");
WEE_CHECK_EVAL("abc", "${split:1, ,,abc def ghi}");
WEE_CHECK_EVAL("def", "${split:2, ,,abc def ghi}");
WEE_CHECK_EVAL("ghi", "${split:3, ,,abc def ghi}");
WEE_CHECK_EVAL("", "${split:4, ,,abc def ghi}");
WEE_CHECK_EVAL("3", "${split:count, ,,abc def ghi}");
WEE_CHECK_EVAL("abc", "${split:1,_-,,abc-def_ghi}");
WEE_CHECK_EVAL("def", "${split:2,_-,,abc-def_ghi}");
WEE_CHECK_EVAL("ghi", "${split:3,_-,,abc-def_ghi}");
WEE_CHECK_EVAL("", "${split:4,_-,,abc-def_ghi}");
WEE_CHECK_EVAL("3", "${split:count,_-,,abc-def_ghi}");
WEE_CHECK_EVAL("abc,def,ghi", "${split:1,,keep_eol,abc,def,ghi}");
WEE_CHECK_EVAL("def,ghi", "${split:2,,keep_eol,abc,def,ghi}");
WEE_CHECK_EVAL("ghi", "${split:3,,keep_eol,abc,def,ghi}");
WEE_CHECK_EVAL("abc,def,ghi", "${split:1,,keep_eol+strip_left,,,abc,def,ghi}");
WEE_CHECK_EVAL("def,ghi", "${split:2,,keep_eol+strip_left,,,abc,def,ghi}");
WEE_CHECK_EVAL("ghi", "${split:3,,keep_eol+strip_left,,,abc,def,ghi}");
WEE_CHECK_EVAL("abc,def,ghi", "${split:1,,keep_eol+strip_left+strip_right,,,abc,def,ghi,,}");
WEE_CHECK_EVAL("def,ghi", "${split:2,,keep_eol+strip_left+strip_right,,,abc,def,ghi,,}");
WEE_CHECK_EVAL("ghi", "${split:3,,keep_eol+strip_left+strip_right,,,abc,def,ghi,,}");
WEE_CHECK_EVAL("abc", "${split:1,,collapse_seps,abc,,,def,,ghi}");
WEE_CHECK_EVAL("def", "${split:2,,collapse_seps,abc,,,def,,ghi}");
WEE_CHECK_EVAL("ghi", "${split:3,,collapse_seps,abc,,,def,,ghi}");
WEE_CHECK_EVAL("abc", "${split:1,,strip_items=_,_abc_,_def_,_ghi_}");
WEE_CHECK_EVAL("def", "${split:2,,strip_items=_,_abc_,_def_,_ghi_}");
WEE_CHECK_EVAL("ghi", "${split:3,,strip_items=_,_abc_,_def_,_ghi_}");
WEE_CHECK_EVAL("def", "${split:2,,max_items=0,abc,def,ghi}");
WEE_CHECK_EVAL("def", "${split:2,,max_items=2,abc,def,ghi}");
WEE_CHECK_EVAL("", "${split:2,,max_items=1,abc,def,ghi}");
/* test split of shell arguments */
WEE_CHECK_EVAL("", "${split_shell:}");
WEE_CHECK_EVAL("", "${split_shell:1}");
WEE_CHECK_EVAL("", "${split_shell:1,}");
WEE_CHECK_EVAL("", "${split_shell:count}");
WEE_CHECK_EVAL("0", "${split_shell:count,}");
WEE_CHECK_EVAL("first arg", "${split_shell:random,\"first arg\"}");
WEE_CHECK_EVAL("", "${split_shell:0,\"first arg\" arg2}");
WEE_CHECK_EVAL("first arg", "${split_shell:1,\"first arg\" arg2}");
WEE_CHECK_EVAL("arg2", "${split_shell:2,\"first arg\" arg2}");
WEE_CHECK_EVAL("arg2", "${split_shell:-1,\"first arg\" arg2}");
WEE_CHECK_EVAL("first arg", "${split_shell:-2,\"first arg\" arg2}");
WEE_CHECK_EVAL("", "${split_shell:-3,\"first arg\" arg2}");
/* test color */
WEE_CHECK_EVAL(gui_color_get_custom ("green"), "${color:green}");
WEE_CHECK_EVAL(gui_color_get_custom ("*214"), "${color:*214}");