diff --git a/doc/cs/weechat_quickstart.cs.adoc b/doc/cs/weechat_quickstart.cs.adoc index 751010fee..5404a4221 100644 --- a/doc/cs/weechat_quickstart.cs.adoc +++ b/doc/cs/weechat_quickstart.cs.adoc @@ -12,8 +12,9 @@ klávesových zkratek. Spustění z Vašeho shellu: +[source,shell] ---- -$ weechat +weechat ---- [[help]] diff --git a/doc/de/weechat_faq.de.adoc b/doc/de/weechat_faq.de.adoc index ac232e127..79aa6f946 100644 --- a/doc/de/weechat_faq.de.adoc +++ b/doc/de/weechat_faq.de.adoc @@ -54,12 +54,14 @@ Wenn Sie weiterhin Probleme haben, melden Sie diese bitte den Entwicklern. Wir empfehlen, dass zur Installation https://brew.sh/[Homebrew ^↗^^] genutzt wird. Hilfe erhält man mittels: +[source,shell] ---- brew info weechat ---- WeeChat kann durch folgenden Befehl installiert werden: +[source,shell] ---- brew install weechat ---- @@ -399,6 +401,7 @@ Umgebungsvariable `TZ` muss auf einen entsprechenden Wert eingestellt werden. Am Besten machen Sie dies in Ihrer Shell-Initialisierungsdatei oder in der Befehlszeile, bevor Sie WeeChat starten: +[source,shell] ---- export TZ=Europe/Berlin ---- @@ -713,8 +716,9 @@ Entsprechend der ausgegebenen Information, wird ggf. eine Maus nicht unterstütz Um zu testen ob eine Mausunterstützung vom Terminal bereitgestellt wird, sollte man folgende Zeile im Terminal eingeben: +[source,shell] ---- -$ printf '\033[?1002h' +printf '\033[?1002h' ---- Jetzt klickt man mit der Maus auf das erste Zeichen im Terminal (linke obere @@ -722,8 +726,9 @@ Ecke). Als Ergebnis sollte man folgende Zeichenkette erhalten: " !!#!!". Um die Mausunterstützung im Terminal zu beenden: +[source,shell] ---- -$ printf '\033[?1002l' +printf '\033[?1002l' ---- [[mouse_coords]] @@ -1067,8 +1072,9 @@ Als erstes sollte das Kapitel über TLS Verbindungen in dieser FAQ gelesen werde Wenn das nicht hilft, sollte die Skriptliste von Hand gelöscht werden. Dazu folgenden Befehl in der Shell ausführen: +[source,shell] ---- -$ rm ~/.cache/weechat/script/plugins.xml.gz +rm ~/.cache/weechat/script/plugins.xml.gz ---- [NOTE] @@ -1092,15 +1098,17 @@ Das bedeutet aber auch, dass die Skripten von Hand aktuell gehalten werden müss * und in der Shell, mit installiertem curl: +[source,shell] ---- -$ cd ~/.cache/weechat/script -$ curl -O https://weechat.org/files/plugins.xml.gz +cd ~/.cache/weechat/script +curl -O https://weechat.org/files/plugins.xml.gz ---- Wenn Sie macOS ausführen und die heruntergeladene Datei eine Größe von 0 Byte hat, versuchen Sie, diese Variable in Ihrer Shell-Initialisierungsdatei oder auf der Befehlszeile zu setzen. Bevor Sie WeeChat starten: +[source,shell] ---- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ---- @@ -1272,6 +1280,7 @@ siehe https://weechat.org/about/support/[this page ^↗^^]. Falls man WeeChat in gdb ausführt, kann folgende Fehlermeldung erscheinen: +[source,shell] ---- $ gdb /Pfad/zu/weechat (gdb) run @@ -1282,6 +1291,7 @@ Cannot find new threads: generic error Um diesen Fehler zu beheben, sollte man gdb wie folgt aufrufen (der Pfad zu libpthread und WeeChat muss natürlich an das eigene System angepasst werden): +[source,shell] ---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /Pfad/zu/weechat (gdb) run diff --git a/doc/de/weechat_quickstart.de.adoc b/doc/de/weechat_quickstart.de.adoc index f09af9556..3fd6dfc81 100644 --- a/doc/de/weechat_quickstart.de.adoc +++ b/doc/de/weechat_quickstart.de.adoc @@ -19,8 +19,9 @@ keine Probleme mit der Standard Tastaturbelegung. Programmstart aus deiner Shell: +[source,shell] ---- -$ weechat +weechat ---- [[help]] diff --git a/doc/de/weechat_scripting.de.adoc b/doc/de/weechat_scripting.de.adoc index dba45d1ee..da79bb47e 100644 --- a/doc/de/weechat_scripting.de.adoc +++ b/doc/de/weechat_scripting.de.adoc @@ -373,9 +373,10 @@ anlegen, der in das Verzeichnis _Skriptsprache/autoload_ zeigt. Ein Beispiel für ein Python-Skript: +[source,shell] ---- -$ cd ~/.local/share/weechat/python/autoload -$ ln -s ../script.py +cd ~/.local/share/weechat/python/autoload +ln -s ../script.py ---- [NOTE] diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc index 8247283d0..66c615e49 100644 --- a/doc/de/weechat_user.de.adoc +++ b/doc/de/weechat_user.de.adoc @@ -227,8 +227,9 @@ Falls eine Debian/Ubuntu basierte Distribution genutzt wird und man einen es mit folgendem Befehl möglich alle notwendigen Abhängigkeiten zu installieren: +[source,shell] ---- -# apt-get build-dep weechat +sudo apt-get build-dep weechat ---- [[build]] @@ -236,22 +237,24 @@ installieren: * Installation in das Systemverzeichnis (benötigt _root_ Privilegien): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -$ make -$ sudo make install +mkdir build +cd build +cmake .. +make +sudo make install ---- * Installation in ein benutzerdefiniertes Verzeichnis (zum Beispiel ins Heimatverzeichnis): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -DCMAKE_INSTALL_PREFIX=/Pfad/zum/Verzeichnis -$ make -$ make install +mkdir build +cd build +cmake .. -DCMAKE_INSTALL_PREFIX=/Pfad/zum/Verzeichnis +make +make install ---- Optionen für CMake können mit dem Format, `-DOPTION=VALUE`, genutzt werden. @@ -387,14 +390,16 @@ Liste der verfügbaren Optionen: Weitere Optionen können mit folgendem Befehl angezeigt werden: +[source,shell] ---- -$ cmake -LA +cmake -LA ---- oder mittels der Curses-Oberfläche: +[source,shell] ---- -$ ccmake .. +ccmake .. ---- [[tests]] @@ -407,14 +412,16 @@ Folgende Pakete werden *benötigt* um Tests zu kompilieren: Tests muss aktiviert werden wenn WeeChat kompiliert wird: +[source,shell] ---- -$ cmake .. -DENABLE_TESTS=ON +cmake .. -DENABLE_TESTS=ON ---- Nach der Kompilierung wird die Testumgebung im build-Verzeichnis ausgeführt: +[source,shell] ---- -$ ctest -V +ctest -V ---- [[git_sources]] @@ -425,8 +432,9 @@ sich die Quellen nicht kompilieren oder der Code ist nicht stabil. Sie sind hier Um die Git Quellen zu beziehen nutzen Sie folgende Befehle: +[source,shell] ---- -$ git clone https://github.com/weechat/weechat.git +git clone https://github.com/weechat/weechat.git ---- Folgen Sie bitte der Anleitung zur Erstellung aus Quellpaketen (siehe <>). @@ -447,8 +455,9 @@ Falls WeeChat abgestürzt sein sollte und Sie diesen Fehler melden möchten: Bei der Kompilierung mit CMake muss folgende Option gesetzt werden: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug +cmake .. -DCMAKE_BUILD_TYPE=Debug ---- [[address_sanitizer]] @@ -457,8 +466,9 @@ $ cmake .. -DCMAKE_BUILD_TYPE=Debug Sie können zusätzlich den Adress-Sanitizer aktivieren, der bei Problemen sofort zum Absturz von WeeChat führt: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address +cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address ---- [WARNING] @@ -467,8 +477,9 @@ Absturz zu provozieren. Diese Funktion wird im produktiven Einsatz nicht empfohl Nach dem Kompilieren und Installieren müssen Sie WeeChat folgendermaßen ausführen: +[source,shell] ---- -$ ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat +ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat ---- Im Falle eines Absturzes befinden sich zusätzliche Informationen in der Datei, `asan.log`. @@ -489,12 +500,14 @@ aktivieren, bevor WeeChat gestaret wird, wird der Befehl `ulimit` benötigt. Zum Beispiel muss unter Linux in einer _bash_ Shell folgender Befehl in die `~/.bashrc` Datei eingetragen werden: +[source,shell] ---- ulimit -c unlimited ---- optional kann noch die maximale Dateigröße bestimmt werden: +[source,shell] ---- ulimit -c 200000 ---- @@ -518,6 +531,7 @@ https://wiki.archlinux.org/title/Core_dump[wiki page ^↗^^]. Beispiel: _weechat_ ist in _/usr/bin/_ installiert und die _core_ Datei befindet sich in _/home/user/_. Nun wird gdb mit folgendem Befehl aufgerufen: +[source,shell] ---- gdb /usr/bin/weechat /home/user/core ---- @@ -565,6 +579,7 @@ Um eine laufende Sitzung von WeeChat zu debuggen (zum Beispiel wenn WeeChat nich mehr reagieren sollte) sollte man gdb mit der Prozess-ID starten (_12345_ muss durch die PID des laufenden weechat Prozesses ersetzt werden): +[source,shell] ---- gdb /usr/bin/weechat 12345 ---- @@ -580,8 +595,9 @@ Sollte WeeChat abgestürzt sein, muss der Befehl `bt full` genutzt werden: Um WeeChat zu starten muss folgender Befehl ausgeführt werden: +[source,shell] ---- -$ weechat +weechat ---- Wird WeeChat das erste mal ausgeführt, wird die Standardkonfiguration und @@ -799,8 +815,9 @@ Dies speichert den aktuellen Status in `*.upgrade`-Dateien. Sie können dann ent die gesamten WeeChat-Verzeichnisse (Konfiguration, Daten, Cache) neu starten oder auf einen anderen Computer verschieben und WeeChat später mit diesem Befehl neu starten: +[source,shell] ---- -$ weechat --upgrade +weechat --upgrade ---- [[restart_after_upgrade]] @@ -2847,8 +2864,9 @@ Option in die Sektion "option" der Aspell-Konfiguration hinzufügt. Den Name der Option findet man in der ASpell-Konfigurationsdatei. Eine Auflistung aller möglichen Optionen erhält man durch: +[source,shell] ---- -$ aspell config +aspell config ---- Um zum Beispiel die Option "ignore-case" einzuschalten: @@ -3423,8 +3441,9 @@ irc[6][s]://[nick[:password]@]irc.example.org[:port][/channel][,channel[...]] Beispiel: Anmelden beim Server _irc.libera.chat_ mit dem Nick _alice_ und betreten der Kanäle _#weechat_ und _#weechat-fr_ (Standardport (6667) wird genutzt): +[source,shell] ---- -$ weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr +weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr ---- [[irc_servers]] @@ -3582,9 +3601,10 @@ die Verbindung mit einer vorherigen Version (<0.3.1) funktioniert hat. * Importieren Sie die Zertifikate in einer Shell: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt +mkdir -p ~/.config/weechat/tls +wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt ---- [NOTE] @@ -3605,10 +3625,11 @@ Es ist möglich mehrere Zertifikate in der Datei CAs.pem zu verwenden. * Erstellen Sie ein Zertifikat in der Shell: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ---- [NOTE] @@ -3657,8 +3678,9 @@ dadurch kein Passwort während des Verbindungsaufbaus benötigt). Ein Schlüssel kann mit folgendem Befehl erzeugt werden: +[source,shell] ---- -$ openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem +openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem ---- [NOTE] @@ -3668,8 +3690,9 @@ das auch beispielsweise `~/.weechat` sein kann. Um den öffentlichen Schlüssel zu erhalten (base64 enkodiert) muss folgender Befehl ausgeführt werden: +[source,shell] ---- -$ openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 +openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 ---- Nun Verbindung zum Server herstellen, identifizieren (z.B. mittels "nickserv identify") @@ -3739,8 +3762,9 @@ Privatsphäre und Sicherheit im Internet verbessern können. Im ersten Schritt muss Tor installiert werden. Für Debian (und Derivate): +[source,shell] ---- -$ sudo apt-get install tor +sudo apt-get install tor ---- In WeeChat muss nun ein socks5-Proxy für den Tor Service erstellt werden (Hostname/IP @@ -4669,10 +4693,11 @@ Der Standardpfad zum Zertifikat/Schlüssel wird durch die Option definiert Ein Zertifikat und einen privaten Schlüssel kann man mit folgenden Befehlen erstellen: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ---- [NOTE] @@ -4822,8 +4847,9 @@ andere Ports nicht geöffnet werden können. OpenSSH nutzen: +[source,shell] ---- -$ ssh -L 9000:.weechat/relay_socket user@hostname +ssh -L 9000:.weechat/relay_socket user@hostname ---- Dies leitet lokale relay Client Verbindungen von Port 9000 um, zu @@ -4911,34 +4937,39 @@ einige Beispiele: * Ändert den eigenen Nick auf dem IRC Server libera in "newnick": +[source,shell] ---- -$ echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Schickt eine Nachrich in den IRC #weechat Channel: +[source,shell] ---- -$ echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Sendet eine mehrzeilige Nachricht in den IRC Kanal #test, wenn die Fähigkeit "draft/multiline" auf dem Ergo Server aktiviert ist: +[source,shell] ---- -$ echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Schickt eine Nachricht in den aktuellen Buffer: +[source,shell] ---- -$ echo '*hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo '*hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Sendet zwei Befehle um alle Python-Skripten zu entfernen und dann neu zu laden (die beiden Befehle müssen mit "\n" getrennt werden): +[source,shell] ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 +printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 ---- [[fifo_commands]] diff --git a/doc/en/weechat_dev.en.adoc b/doc/en/weechat_dev.en.adoc index 413e2cfd7..f6668a5da 100644 --- a/doc/en/weechat_dev.en.adoc +++ b/doc/en/weechat_dev.en.adoc @@ -1298,9 +1298,10 @@ Gettext files are in directory _po/_. If you want to initialize a new language, use command `msginit`. For example to create a file which is ready to translate to Dutch: +[source,shell] ---- -$ cd po -$ msginit -i weechat.pot -l nl_NL -o nl.po +cd po +msginit -i weechat.pot -l nl_NL -o nl.po ---- Base language for WeeChat is English, so you must of course perfectly understand @@ -1309,8 +1310,9 @@ English in order to translate to your language. After changes in sources, you can regenerate all translations files: run this command in the CMake "build" directory: +[source,shell] ---- -$ make translations && make update-po +make translations && make update-po ---- Then you can edit .po files (if you can translate in a language). @@ -1318,8 +1320,9 @@ Then you can edit .po files (if you can translate in a language). When done, you *have* to check your file with https://github.com/flashcode/msgcheck[msgcheck ^↗^^]: +[source,shell] ---- -$ msgcheck.py xx.po +msgcheck.py xx.po ---- And then you can recompile WeeChat to use the new translations. diff --git a/doc/en/weechat_faq.en.adoc b/doc/en/weechat_faq.en.adoc index bf705de34..9a19ee28d 100644 --- a/doc/en/weechat_faq.en.adoc +++ b/doc/en/weechat_faq.en.adoc @@ -48,12 +48,14 @@ If you still have issues, please report them to the developers. It is recommended to use https://brew.sh/[Homebrew ^↗^^], you can get help with: +[source,shell] ---- brew info weechat ---- You can install WeeChat with this command: +[source,shell] ---- brew install weechat ---- @@ -379,6 +381,7 @@ There is no option in WeeChat to change the timezone, the environment variable In your shell initialization file or on command line, before starting WeeChat: +[source,shell] ---- export TZ=America/New_York ---- @@ -682,16 +685,18 @@ According to terminfo used, mouse may not be supported. You can test mouse support in terminal: +[source,shell] ---- -$ printf '\033[?1002h' +printf '\033[?1002h' ---- And then click on first char of terminal (upper left). You should see " !!#!!". To disable mouse in terminal: +[source,shell] ---- -$ printf '\033[?1002l' +printf '\033[?1002l' ---- [[mouse_coords]] @@ -999,8 +1004,9 @@ First check questions about TLS connection in this FAQ. If still not working, try to manually delete the scripts file (in your shell): +[source,shell] ---- -$ rm ~/.cache/weechat/script/plugins.xml.gz +rm ~/.cache/weechat/script/plugins.xml.gz ---- [NOTE] @@ -1024,15 +1030,17 @@ have to update manually the file yourself to get updates): * in your shell, with curl installed: +[source,shell] ---- -$ cd ~/.cache/weechat/script -$ curl -O https://weechat.org/files/plugins.xml.gz +cd ~/.cache/weechat/script +curl -O https://weechat.org/files/plugins.xml.gz ---- If you're running macOS and the downloaded file has a size of 0 bytes, try to set this variable in your shell initialization file or on command line, before starting WeeChat: +[source,shell] ---- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ---- @@ -1202,6 +1210,7 @@ See https://weechat.org/about/support/[this page ^↗^^]. When you run WeeChat under gdb, you may have this error: +[source,shell] ---- $ gdb /path/to/weechat (gdb) run @@ -1212,6 +1221,7 @@ Cannot find new threads: generic error To fix that, you can run gdb with this command (replace path to libpthread and WeeChat with paths on your system): +[source,shell] ---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /path/to/weechat (gdb) run diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 8c89e0e07..1452d4ee0 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -165,9 +165,10 @@ required. To compile a plugin which has one file "toto.c" (under GNU/Linux): +[source,shell] ---- -$ gcc -fPIC -Wall -c toto.c -$ gcc -shared -fPIC -o toto.so toto.o +gcc -fPIC -Wall -c toto.c +gcc -shared -fPIC -o toto.so toto.o ---- [[load_plugin]] diff --git a/doc/en/weechat_quickstart.en.adoc b/doc/en/weechat_quickstart.en.adoc index 7b532452d..edb640f35 100644 --- a/doc/en/weechat_quickstart.en.adoc +++ b/doc/en/weechat_quickstart.en.adoc @@ -11,8 +11,9 @@ It has good UTF-8 support and works well with WeeChat's default key bindings. Run from your shell: +[source,shell] ---- -$ weechat +weechat ---- [[help]] diff --git a/doc/en/weechat_scripting.en.adoc b/doc/en/weechat_scripting.en.adoc index c2268638d..42094fd5b 100644 --- a/doc/en/weechat_scripting.en.adoc +++ b/doc/en/weechat_scripting.en.adoc @@ -362,9 +362,10 @@ WeeChat is starting. For example with Python: +[source,shell] ---- -$ cd ~/.local/share/weechat/python/autoload -$ ln -s ../script.py +cd ~/.local/share/weechat/python/autoload +ln -s ../script.py ---- [NOTE] diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc index 44d479f4b..8098d136c 100644 --- a/doc/en/weechat_user.en.adoc +++ b/doc/en/weechat_user.en.adoc @@ -220,8 +220,9 @@ If you are using a Debian/Ubuntu based distribution, and if you have some "deb-src" source entries in your file _/etc/apt/sources.list_, you can install all dependencies with the command: +[source,shell] ---- -# apt-get build-dep weechat +sudo apt-get build-dep weechat ---- [[build]] @@ -229,22 +230,24 @@ all dependencies with the command: * Installation in system directories (requires _root_ privileges): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -$ make -$ sudo make install +mkdir build +cd build +cmake .. +make +sudo make install ---- * Installation in custom directory (for example your home): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/directory -$ make -$ make install +mkdir build +cd build +cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/directory +make +make install ---- Options can be used for CMake, with format: `-DOPTION=VALUE`. @@ -380,14 +383,16 @@ List of available options: The other options can be displayed with this command: +[source,shell] ---- -$ cmake -LA +cmake -LA ---- Or with Curses interface: +[source,shell] ---- -$ ccmake .. +ccmake .. ---- [[tests]] @@ -400,14 +405,16 @@ Following packages are *required* to compile tests: Tests must be enabled when compiling WeeChat: +[source,shell] ---- -$ cmake .. -DENABLE_TESTS=ON +cmake .. -DENABLE_TESTS=ON ---- They can be launched after compilation from the build directory: +[source,shell] ---- -$ ctest -V +ctest -V ---- [[git_sources]] @@ -418,8 +425,9 @@ stable. You're warned! To get Git sources, issue this command: +[source,shell] ---- -$ git clone https://github.com/weechat/weechat.git +git clone https://github.com/weechat/weechat.git ---- Then follow instructions for source package (see @@ -442,8 +450,9 @@ you have to: If you're compiling with CMake: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug +cmake .. -DCMAKE_BUILD_TYPE=Debug ---- [[address_sanitizer]] @@ -452,8 +461,9 @@ $ cmake .. -DCMAKE_BUILD_TYPE=Debug You can additionally enable the address sanitizer, which causes WeeChat to crash immediately in case of problem: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address +cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address ---- [WARNING] @@ -462,8 +472,9 @@ this is not recommended in production. Then once compiled and installed, you must run WeeChat like this: +[source,shell] ---- -$ ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat +ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat ---- In case of crash, the backtrace is in file `asan.log`. @@ -483,12 +494,14 @@ starts, you can use `ulimit` command. For example under Linux with _bash_ shell, add this line to your `~/.bashrc`: +[source,shell] ---- ulimit -c unlimited ---- Or max size: +[source,shell] ---- ulimit -c 200000 ---- @@ -510,6 +523,7 @@ https://wiki.archlinux.org/title/Core_dump[wiki page ^↗^^]. For example if _weechat_ is installed in _/usr/bin/_ and _core_ file is in _/home/user/_, then run gdb with this command: +[source,shell] ---- gdb /usr/bin/weechat /home/user/core ---- @@ -557,6 +571,7 @@ Thank you for your help! To debug a running WeeChat (for example if WeeChat seems blocked), you can use gdb with process id (replace _12345_ with PID of weechat process): +[source,shell] ---- gdb /usr/bin/weechat 12345 ---- @@ -572,8 +587,9 @@ Then like for a crash, use command `bt full`: To start WeeChat, issue this command: +[source,shell] ---- -$ weechat +weechat ---- When you run WeeChat for the first time, the default configuration files are @@ -789,8 +805,9 @@ This saves the current state in `*.upgrade` files. You can then either reboot or move the whole WeeChat directories (config, data, cache) to another machine, and restart WeeChat later with this command: +[source,shell] ---- -$ weechat --upgrade +weechat --upgrade ---- [[restart_after_upgrade]] @@ -2806,8 +2823,9 @@ configuration. The option name is an aspell configuration option. List of options can be found in a shell with following command: +[source,shell] ---- -$ aspell config +aspell config ---- For example, to enable option "ignore-case": @@ -3367,8 +3385,9 @@ irc[6][s]://[nick[:password]@]irc.example.org[:port][/channel][,channel[...]] Example to join _#weechat_ and _#weechat-fr_ on server _irc.libera.chat_ server, default port (6667), with nick _alice_: +[source,shell] ---- -$ weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr +weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr ---- [[irc_servers]] @@ -3522,9 +3541,10 @@ even if it was OK with versions prior to 0.3.1. * Import certificate in shell: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt +mkdir -p ~/.config/weechat/tls +wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt ---- [NOTE] @@ -3545,10 +3565,11 @@ It is possible to concatenate many certificates in file CAs.pem. * Create certificate in shell: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ---- [NOTE] @@ -3596,8 +3617,9 @@ ECDSA-NIST256P-CHALLENGE mechanism (no password is required on connection). You can generate the key with this command: +[source,shell] ---- -$ openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem +openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem ---- [NOTE] @@ -3606,8 +3628,9 @@ which can also be for example `~/.weechat`. Get the public key (encoded as base64) with this command: +[source,shell] ---- -$ openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 +openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 ---- Connect to the server, identify (for example with "nickserv identify") and set @@ -3674,8 +3697,9 @@ privacy and security on the Internet. In first place, install Tor. For Debian (and derived): +[source,shell] ---- -$ sudo apt-get install tor +sudo apt-get install tor ---- In WeeChat you need to add a socks5 proxy for Tor service (hostname/IP and @@ -4588,10 +4612,11 @@ The default path to certificate/key is defined by option You can create a certificate and private key with following commands: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ---- [NOTE] @@ -4736,8 +4761,9 @@ SSH forwarding for relay clients, when other ports cannot be opened. Using OpenSSH: +[source,shell] ---- -$ ssh -L 9000:.weechat/relay_socket user@hostname +ssh -L 9000:.weechat/relay_socket user@hostname ---- This redirects local relay clients connecting on port 9000 to the WeeChat @@ -4823,34 +4849,39 @@ Some examples: * Change nick on IRC server libera to "newnick": +[source,shell] ---- -$ echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Send a message on IRC #weechat channel: +[source,shell] ---- -$ echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Send a multiline message on IRC #test channel, if capability "draft/multiline" is enabled on the ergo server: +[source,shell] ---- -$ echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Send a message on current buffer: +[source,shell] ---- -$ echo '*hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo '*hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Send two commands to unload/reload Python scripts (you have to separate them with "\n"): +[source,shell] ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 +printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 ---- [[fifo_commands]] diff --git a/doc/es/weechat_faq.es.adoc b/doc/es/weechat_faq.es.adoc index e1ba82416..f31a7ab59 100644 --- a/doc/es/weechat_faq.es.adoc +++ b/doc/es/weechat_faq.es.adoc @@ -58,12 +58,14 @@ If you still have issues, please report them to the developers. Se recomienda utilizar https://brew.sh/[Homebrew ^↗^^], puede obtener ayuda con el comando: +[source,shell] ---- brew info weechat ---- Puede instalar WeeChat con este comando: +[source,shell] ---- brew install weechat ---- @@ -394,6 +396,7 @@ No hay razón en WeeChat para cambiar la zona horaria, la variable de entorno En el archivo de inicialización de su shell o en la línea de comando, antes de ejecutar WeeChat: +[source,shell] ---- export TZ=America/New_York ---- @@ -701,16 +704,18 @@ De acuerdo a la información usada, el ratón podrá o no estar soportado. Puede comprobar el soporte del ratón en la terminal: +[source,shell] ---- -$ printf '\033[?1002h' +printf '\033[?1002h' ---- Y después haga clic en el primer caracter de la terminal (superior izquierdo). Debería ver " !!#!!". Para inhabilitar el ratón en la terminal: +[source,shell] ---- -$ printf '\033[?1002l' +printf '\033[?1002l' ---- [[mouse_coords]] @@ -1033,8 +1038,9 @@ Primero compruebe las preguntas sobre la conexión TLS en este documento. Si todavía no funciona, trate de manera manual eliminar los archivos de scripts (escriba en su terminal): +[source,shell] ---- -$ rm ~/.cache/weechat/script/plugins.xml.gz +rm ~/.cache/weechat/script/plugins.xml.gz ---- // TRANSLATION MISSING @@ -1059,9 +1065,10 @@ que actualizar manualmente el archivo usted mismo para obtener las actualizacion * en su terminal, con el software curl instalado: +[source,shell] ---- -$ cd ~/.cache/weechat/script -$ curl -O https://weechat.org/files/plugins.xml.gz +cd ~/.cache/weechat/script +curl -O https://weechat.org/files/plugins.xml.gz ---- // TRANSLATION MISSING @@ -1069,6 +1076,7 @@ If you're running macOS and the downloaded file has a size of 0 bytes, try to set this variable in your shell initialization file or on command line, before starting WeeChat: +[source,shell] ---- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ---- @@ -1243,6 +1251,7 @@ See https://weechat.org/about/support/[this page ^↗^^]. Cuando ejecuta WeeChat bajo gdb, puede tener este error: +[source,shell] ---- $ gdb /ruta/a/weechat (gdb) run @@ -1253,6 +1262,7 @@ Cannot find new threads: generic error Para solucionar esto, puede ejecutar gdb con este comando (reemplace la ruta a libpthread y WeeChat con las rutas de su sistema): +[source,shell] ---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /ruta/a/weechat (gdb) run diff --git a/doc/es/weechat_quickstart.es.adoc b/doc/es/weechat_quickstart.es.adoc index b86cdf009..f7dc9ba20 100644 --- a/doc/es/weechat_quickstart.es.adoc +++ b/doc/es/weechat_quickstart.es.adoc @@ -18,8 +18,9 @@ los atajos de teclado predeterminados. Ejecuta desde una consola: +[source,shell] ---- -$ weechat +weechat ---- [[help]] diff --git a/doc/fr/weechat_dev.fr.adoc b/doc/fr/weechat_dev.fr.adoc index 618ac2c9f..a8342a6ae 100644 --- a/doc/fr/weechat_dev.fr.adoc +++ b/doc/fr/weechat_dev.fr.adoc @@ -1318,9 +1318,10 @@ Si vous souhaitez initialiser une nouvelle langue, utilisez la commande `msginit`. Par exemple pour créer un fichier qui est prêt à traduire en néerlandais : +[source,shell] ---- -$ cd po -$ msginit -i weechat.pot -l nl_NL -o nl.po +cd po +msginit -i weechat.pot -l nl_NL -o nl.po ---- La langue de base pour WeeChat est l'anglais, donc vous devez évidemment @@ -1329,8 +1330,9 @@ comprendre parfaitement l'anglais pour traduire vers votre langue. Après des changements dans les sources, vous pouvez regénérer toutes les traductions : lancez cette commande dans le répertoire "build" de CMake : +[source,shell] ---- -$ make translations && make update-po +make translations && make update-po ---- Vous pouvez alors éditer les fichiers .po (si vous pouvez traduire dans une @@ -1339,8 +1341,9 @@ langue). Une fois terminé, vous *devez* vérifier votre fichier avec https://github.com/flashcode/msgcheck[msgcheck ^↗^^] : +[source,shell] ---- -$ msgcheck.py xx.po +msgcheck.py xx.po ---- Et vous pouvez alors recompiler WeeChat pour utiliser les nouvelles traductions. diff --git a/doc/fr/weechat_faq.fr.adoc b/doc/fr/weechat_faq.fr.adoc index b05ba8eb4..3d42f0e30 100644 --- a/doc/fr/weechat_faq.fr.adoc +++ b/doc/fr/weechat_faq.fr.adoc @@ -50,12 +50,14 @@ Si vous avez toujours des problèmes, merci de les remonter aux développeurs. Il est recommandé d'utiliser https://brew.sh/[Homebrew ^↗^^], vous pouvez avoir de l'aide avec : +[source,shell] ---- brew info weechat ---- Vous pouvez installer WeeChat avec cette commande : +[source,shell] ---- brew install weechat ---- @@ -393,6 +395,7 @@ d'environnement `TZ` doit être positionnée à la valeur appropriée. Dans votre fichier d'initialisation du shell ou sur la ligne de commande, avant de démarrer WeeChat : +[source,shell] ---- export TZ=Europe/Paris ---- @@ -704,8 +707,9 @@ Selon le terminfo utilisé, la souris peut ne pas être supportée. Vous pouvez tester le support de la souris dans le terminal : +[source,shell] ---- -$ printf '\033[?1002h' +printf '\033[?1002h' ---- Et cliquez sur le premier caractère du terminal (en haut à gauche). Vous devriez @@ -713,8 +717,9 @@ voir " !!#!!". Pour désactiver la souris dans le terminal : +[source,shell] ---- -$ printf '\033[?1002l' +printf '\033[?1002l' ---- [[mouse_coords]] @@ -1035,8 +1040,9 @@ Consultez d'abord les questions à propos des connexions TLS dans cette FAQ. Si cela ne fonctionne toujours pas, essayez de supprimer manuellement le fichier avec les scripts (dans votre shell) : +[source,shell] ---- -$ rm ~/.cache/weechat/script/plugins.xml.gz +rm ~/.cache/weechat/script/plugins.xml.gz ---- [NOTE] @@ -1062,15 +1068,17 @@ vous-même pour obtenir les mises à jour) : * dans votre shell, avec curl installé : +[source,shell] ---- -$ cd ~/.cache/weechat/script -$ curl -O https://weechat.org/files/plugins.xml.gz +cd ~/.cache/weechat/script +curl -O https://weechat.org/files/plugins.xml.gz ---- Si vous êtes sous macOS et que le fichier téléchargé a une taille de 0 octet, essayez de définir cette variable dans votre fichier d'initialisation du shell ou sur la ligne de commande, avant de démarrer WeeChat : +[source,shell] ---- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ---- @@ -1252,6 +1260,7 @@ Voir https://weechat.org/about/support/[cette page ^↗^^]. Quand vous lancez WeeChat sous gdb, vous pouvez avoir cette erreur : +[source,shell] ---- $ gdb /path/to/weechat (gdb) run @@ -1262,6 +1271,7 @@ Cannot find new threads: generic error Pour corriger ça, vous pouvez lancer gdb avec cette commande (remplacez le chemin vers libpthread et WeeChat avec les chemins sur votre système) : +[source,shell] ---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /path/to/weechat (gdb) run diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index fffdbc93a..a6e8e3fb8 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -170,9 +170,10 @@ _weechat-plugin.h_ est requis. Pour compiler l'extension qui n'a qu'un fichier "toto.c" (sous GNU/Linux) : +[source,shell] ---- -$ gcc -fPIC -Wall -c toto.c -$ gcc -shared -fPIC -o toto.so toto.o +gcc -fPIC -Wall -c toto.c +gcc -shared -fPIC -o toto.so toto.o ---- [[load_plugin]] diff --git a/doc/fr/weechat_quickstart.fr.adoc b/doc/fr/weechat_quickstart.fr.adoc index ba303a588..7cfbbabff 100644 --- a/doc/fr/weechat_quickstart.fr.adoc +++ b/doc/fr/weechat_quickstart.fr.adoc @@ -13,8 +13,9 @@ touches par défaut. Lancer depuis votre shell : +[source,shell] ---- -$ weechat +weechat ---- [[help]] diff --git a/doc/fr/weechat_scripting.fr.adoc b/doc/fr/weechat_scripting.fr.adoc index 666433d9d..77281d481 100644 --- a/doc/fr/weechat_scripting.fr.adoc +++ b/doc/fr/weechat_scripting.fr.adoc @@ -376,9 +376,10 @@ automatiquement le script quand WeeChat démarre. Par exemple en Python : +[source,shell] ---- -$ cd ~/.local/share/weechat/python/autoload -$ ln -s ../script.py +cd ~/.local/share/weechat/python/autoload +ln -s ../script.py ---- [NOTE] diff --git a/doc/fr/weechat_user.fr.adoc b/doc/fr/weechat_user.fr.adoc index adebf4b6e..49df75273 100644 --- a/doc/fr/weechat_user.fr.adoc +++ b/doc/fr/weechat_user.fr.adoc @@ -219,8 +219,9 @@ Si vous utilisez une distribution basée sur Debian ou Ubuntu, et si vous avez des entrées source "deb-src" dans votre fichier _/etc/apt/sources.list_, vous pouvez installer toutes les dépendances avec la commande : +[source,shell] ---- -# apt-get build-dep weechat +sudo apt-get build-dep weechat ---- [[build]] @@ -228,22 +229,24 @@ pouvez installer toutes les dépendances avec la commande : * Installation dans les répertoires systèmes (nécessite les droits _root_) : +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -$ make -$ sudo make install +mkdir build +cd build +cmake .. +make +sudo make install ---- * Installation dans un répertoire spécifique (par exemple dans votre "home") : +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -DCMAKE_INSTALL_PREFIX=/chemin/vers/répertoire -$ make -$ make install +mkdir build +cd build +cmake .. -DCMAKE_INSTALL_PREFIX=/chemin/vers/répertoire +make +make install ---- Des options peuvent être utilisées pour CMake, avec le format : `-DOPTION=VALUE`. @@ -380,14 +383,16 @@ Liste des options disponibles : Les autres options peuvent être affichées avec cette commande : +[source,shell] ---- -$ cmake -LA +cmake -LA ---- Ou avec l'interface Curses : +[source,shell] ---- -$ ccmake .. +ccmake .. ---- [[tests]] @@ -400,14 +405,16 @@ Les paquets suivants sont nécessaires pour compiler les tests : Les tests doivent être activés pour compiler WeeChat : +[source,shell] ---- -$ cmake .. -DENABLE_TESTS=ON +cmake .. -DENABLE_TESTS=ON ---- Ils peuvent être lancés après compilation depuis le répertoire de construction : +[source,shell] ---- -$ ctest -V +ctest -V ---- [[git_sources]] @@ -418,8 +425,9 @@ que WeeChat ne compile pas et qu'il soit très instable. Vous êtes prévenus ! Pour récupérer les sources Git, tapez cette commande : +[source,shell] ---- -$ git clone https://github.com/weechat/weechat.git +git clone https://github.com/weechat/weechat.git ---- Suivez alors les instructions du paquet source (voir @@ -442,8 +450,9 @@ futur de WeeChat, vous devez : Si vous compilez avec CMake : +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug +cmake .. -DCMAKE_BUILD_TYPE=Debug ---- [[address_sanitizer]] @@ -452,8 +461,9 @@ $ cmake .. -DCMAKE_BUILD_TYPE=Debug Vous pouvez aussi activer la vérification des adresses (« address sanitizer »), ce qui provoquera immédiatement un plantage de WeeChat en cas de problème : +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address +cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address ---- [WARNING] @@ -462,8 +472,9 @@ provoquer un plantage, ce qui n'est pas recommandé en production. Une fois compilé et installé, vous devez lancer WeeChat comme ceci : +[source,shell] ---- -$ ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat +ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat ---- En cas de plantage, la trace se trouve dans le fichier `asan.log`. @@ -484,12 +495,14 @@ WeeChat ne démarre, vous pouvez utiliser la commande `ulimit`. Par exemple sous Linux avec le shell _bash_, ajoutez cette ligne dans votre `~/.bashrc` : +[source,shell] ---- ulimit -c unlimited ---- Ou une taille maximum : +[source,shell] ---- ulimit -c 200000 ---- @@ -513,6 +526,7 @@ https://wiki.archlinux.org/title/Core_dump[page wiki ^↗^^]. Par exemple si _weechat_ est installé dans _/usr/bin/_ et que le fichier _core_ se trouve dans _/home/user/_, alors il faut lancer gdb avec cette commande : +[source,shell] ---- gdb /usr/bin/weechat /home/user/core ---- @@ -561,6 +575,7 @@ Pour déboguer WeeChat qui tourne (par exemple si WeeChat semble bloqué), vous pouvez utiliser gdb avec l'identifiant du processus (remplacez _12345_ par le PID du processus weechat) : +[source,shell] ---- gdb /usr/bin/weechat 12345 ---- @@ -576,8 +591,9 @@ Ensuite comme pour un crash, utilisez la commande `bt full` : Pour lancer WeeChat, tapez cette commande : +[source,shell] ---- -$ weechat +weechat ---- Lorsque vous lancez WeeChat pour la première fois, les fichiers de configuration @@ -801,8 +817,9 @@ Cela sauvegarde l'état actuel dans des fichiers `*.upgrade`. Vous pouvez soit rebooter ou déplacer les répertoires WeeChat (config, data, cache) vers une autre machine, et redémarrer WeeChat plus tard avec cette commande : +[source,shell] ---- -$ weechat --upgrade +weechat --upgrade ---- [[restart_after_upgrade]] @@ -2876,8 +2893,9 @@ options dans la section "option" de la configuration aspell. Le nom de l'option est une option de configuration aspell. La liste des options peut être trouvée par la commande suivante sous le shell : +[source,shell] ---- -$ aspell config +aspell config ---- Par exemple, pour activer l'option "ignore-case" : @@ -3465,8 +3483,9 @@ irc[6][s]://[pseudo[:mot_passe]@]irc.example.org[:port][/canal][,canal[...]] Exemple pour rejoindre _#weechat_ et _#weechat-fr_ sur le serveur _irc.libera.chat_, port par défaut (6667), avec le pseudo _alice_ : +[source,shell] ---- -$ weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr +weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr ---- [[irc_servers]] @@ -3624,9 +3643,10 @@ et peut échouer, même si cela pouvait être OK dans les versions inférieures * Importer le certificat sous le shell : +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt +mkdir -p ~/.config/weechat/tls +wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt ---- [NOTE] @@ -3647,10 +3667,11 @@ Il est possible de concaténer plusieurs certificats dans le fichier CAs.pem. * Créer le certificat sous le shell : +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ---- [NOTE] @@ -3700,8 +3721,9 @@ connexion). Vous pouvez générer la clé avec cette commande : +[source,shell] ---- -$ openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem +openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem ---- [NOTE] @@ -3710,8 +3732,9 @@ config WeeChat qui peut aussi être par exemple `~/.weechat`. Récupérez la clé publique (encodée en base64) avec cette commande : +[source,shell] ---- -$ openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 +openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 ---- Connectez-vous au serveur, identifiez vous (par exemple avec @@ -3781,8 +3804,9 @@ sur Internet. En premier lieu, installez Tor. Pour Debian (et dérivés) : +[source,shell] ---- -$ sudo apt-get install tor +sudo apt-get install tor ---- Sous WeeChat vous devez ajouter un proxy socks5 pour le service Tor (le nom/IP @@ -4723,10 +4747,11 @@ Le chemin par défaut vers le certificat/clé est défini par l'option Vous pouvez créer le certificat et la clé privée avec les commandes suivantes : +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ---- [NOTE] @@ -4881,8 +4906,9 @@ _/run/user/1000/weechat/relay_socket_. Cela est utile pour autoriser le Avec OpenSSH : +[source,shell] ---- -$ ssh -L 9000:.weechat/relay_socket user@hostname +ssh -L 9000:.weechat/relay_socket user@hostname ---- Cela redirige les clients relay locaux qui se connectent au port 9000 vers @@ -4970,34 +4996,39 @@ Quelques exemples : * Changer le pseudo sur libera en "autrepseudo" : +[source,shell] ---- -$ echo 'irc.server.libera */nick autrepseudo' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.server.libera */nick autrepseudo' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Envoyer un message sur le canal IRC #weechat : +[source,shell] ---- -$ echo 'irc.libera.#weechat *bonjour !' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.libera.#weechat *bonjour !' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Envoyer un message multi-lignes sur le canal IRC #test, si la capacité "draft/multiline" est activée sur le serveur ergo : +[source,shell] ---- -$ echo 'irc.ergo.#test \bonjour\n...sur deux lignes !' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.ergo.#test \bonjour\n...sur deux lignes !' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Envoyer un message sur le tampon courant : +[source,shell] ---- -$ echo '*bonjour !' >/run/user/1000/weechat/weechat_fifo_12345 +echo '*bonjour !' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Envoyer deux commandes pour décharger/recharger les scripts Python (vous devez les séparer par "\n") : +[source,shell] ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 +printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 ---- [[fifo_commands]] diff --git a/doc/it/weechat_faq.it.adoc b/doc/it/weechat_faq.it.adoc index b83e0d060..5dcf583af 100644 --- a/doc/it/weechat_faq.it.adoc +++ b/doc/it/weechat_faq.it.adoc @@ -62,6 +62,7 @@ If you still have issues, please report them to the developers. It is recommended to use https://brew.sh/[Homebrew ^↗^^], you can get help with: +[source,shell] ---- brew info weechat ---- @@ -69,6 +70,7 @@ brew info weechat // TRANSLATION MISSING You can install WeeChat with this command: +[source,shell] ---- brew install weechat ---- @@ -424,6 +426,7 @@ There is no option in WeeChat to change the timezone, the environment variable // TRANSLATION MISSING In your shell initialization file or on command line, before starting WeeChat: +[source,shell] ---- export TZ=Europe/Rome ---- @@ -750,8 +753,9 @@ In base al terminale usato, il mouse potrebbe non essere supportato. È possibile testare il supporto al mouse nel terminale: +[source,shell] ---- -$ printf '\033[?1002h' +printf '\033[?1002h' ---- E poi cliccare sul primo carattere del terminale (in alto a sinistra. Dovrebbe @@ -759,8 +763,9 @@ essere possibile vedere !!#!!". Per disabilitare il mouse nel terminale: +[source,shell] ---- -$ printf '\033[?1002l' +printf '\033[?1002l' ---- [[mouse_coords]] @@ -1096,8 +1101,9 @@ First check questions about TLS connection in this FAQ. If still not working, try to manually delete the scripts file (in your shell): +[source,shell] ---- -$ rm ~/.cache/weechat/script/plugins.xml.gz +rm ~/.cache/weechat/script/plugins.xml.gz ---- // TRANSLATION MISSING @@ -1122,9 +1128,10 @@ have to update manually the file yourself to get updates): * in your shell, with curl installed: +[source,shell] ---- -$ cd ~/.cache/weechat/script -$ curl -O https://weechat.org/files/plugins.xml.gz +cd ~/.cache/weechat/script +curl -O https://weechat.org/files/plugins.xml.gz ---- // TRANSLATION MISSING @@ -1132,6 +1139,7 @@ If you're running macOS and the downloaded file has a size of 0 bytes, try to set this variable in your shell initialization file or on command line, before starting WeeChat: +[source,shell] ---- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ---- @@ -1322,6 +1330,7 @@ See https://weechat.org/about/support/[this page ^↗^^]. Quando viene eseguito WeeChat all'interno di gdb, potrebbe verificarsi questo errore: +[source,shell] ---- $ gdb /path/to/weechat (gdb) run @@ -1332,6 +1341,7 @@ Cannot find new threads: generic error Per correggerlo, è possibile eseguire gdb con questo comando (sostituire il path di libpthread e WeeChat con i path del proprio sistema): +[source,shell] ---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /path/to/weechat (gdb) run diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index 32620336b..524ffe5b2 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -185,9 +185,10 @@ il file _weechat-plugin.h_. Per compilare un plugin che ha un file "tizio.c" (in GNU/Linux): +[source,shell] ---- -$ gcc -fPIC -Wall -c tizio.c -$ gcc -shared -fPIC -o tizio.so tizio.o +gcc -fPIC -Wall -c tizio.c +gcc -shared -fPIC -o tizio.so tizio.o ---- [[load_plugin]] diff --git a/doc/it/weechat_quickstart.it.adoc b/doc/it/weechat_quickstart.it.adoc index c2326e1b8..422b4b4b5 100644 --- a/doc/it/weechat_quickstart.it.adoc +++ b/doc/it/weechat_quickstart.it.adoc @@ -18,8 +18,9 @@ le scorciatoie da tastiera predefinite. Avviare dalla propria shell: +[source,shell] ---- -$ weechat +weechat ---- [[help]] diff --git a/doc/it/weechat_scripting.it.adoc b/doc/it/weechat_scripting.it.adoc index 8c00f1a0c..ac7971e5e 100644 --- a/doc/it/weechat_scripting.it.adoc +++ b/doc/it/weechat_scripting.it.adoc @@ -384,9 +384,10 @@ automaticamente gli script all'avvio di WeeChat. Ad esempio con Python: +[source,shell] ---- -$ cd ~/.local/share/weechat/python/autoload -$ ln -s ../script.py +cd ~/.local/share/weechat/python/autoload +ln -s ../script.py ---- [NOTE] diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc index 42e5fc57f..1d5427e4d 100644 --- a/doc/it/weechat_user.it.adoc +++ b/doc/it/weechat_user.it.adoc @@ -263,8 +263,9 @@ If you are using a Debian/Ubuntu based distribution, and if you have some "deb-src" source entries in your file _/etc/apt/sources.list_, you can install all dependencies with the command: +[source,shell] ---- -# apt-get build-dep weechat +sudo apt-get build-dep weechat ---- // TRANSLATION MISSING @@ -273,23 +274,25 @@ all dependencies with the command: * Installazione nelle directory di sistema (richiede privilegi di _root_): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -$ make -$ sudo make install +mkdir build +cd build +cmake .. +make +sudo make install ---- // TRANSLATION MISSING * Installazione in una directory personalizzata (for example your home): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -DCMAKE_INSTALL_PREFIX=/path/della/directory -$ make -$ make install +mkdir build +cd build +cmake .. -DCMAKE_INSTALL_PREFIX=/path/della/directory +make +make install ---- // TRANSLATION MISSING @@ -430,14 +433,16 @@ List of available options: The other options can be displayed with this command: +[source,shell] ---- -$ cmake -LA +cmake -LA ---- Or with Curses interface: +[source,shell] ---- -$ ccmake .. +ccmake .. ---- // TRANSLATION MISSING @@ -451,14 +456,16 @@ Following packages are *required* to compile tests: Tests must be enabled when compiling WeeChat: +[source,shell] ---- -$ cmake .. -DENABLE_TESTS=ON +cmake .. -DENABLE_TESTS=ON ---- They can be launched after compilation from the build directory: +[source,shell] ---- -$ ctest -V +ctest -V ---- [[git_sources]] @@ -469,8 +476,9 @@ compilare o essere instabili. Siete avvisati! Per ottenere i sorgenti Git, dare il comando: +[source,shell] ---- -$ git clone https://github.com/weechat/weechat.git +git clone https://github.com/weechat/weechat.git ---- Poi seguire le istruzioni per i sorgenti (consultare @@ -496,8 +504,9 @@ futuro di WeeChat, è necessario: Se si compila con CMake: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug +cmake .. -DCMAKE_BUILD_TYPE=Debug ---- // TRANSLATION MISSING @@ -508,8 +517,9 @@ $ cmake .. -DCMAKE_BUILD_TYPE=Debug You can additionally enable the address sanitizer, which causes WeeChat to crash immediately in case of problem: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address +cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address ---- // TRANSLATION MISSING @@ -520,8 +530,9 @@ this is not recommended in production. // TRANSLATION MISSING Then once compiled and installed, you must run WeeChat like this: +[source,shell] ---- -$ ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat +ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat ---- // TRANSLATION MISSING @@ -545,12 +556,14 @@ starts, you can use `ulimit` command. Ad esempio su Linux con la shell _bash_, aggiungere questa riga al proprio `~/.bashrc`: +[source,shell] ---- ulimit -c unlimited ---- Oppure impostare una dimensione massima: +[source,shell] ---- ulimit -c 200000 ---- @@ -574,6 +587,7 @@ https://wiki.archlinux.org/title/Core_dump[wiki page ^↗^^]. Ad esempio, se _weechat_ è installato in _/usr/bin/_ ed il file _core_ si trova in _/home/user/_, allora eseguire gdb con questo comando: +[source,shell] ---- gdb /usr/bin/weechat /home/user/core ---- @@ -622,6 +636,7 @@ Per eseguire il debug di un'istanza di WeeChat in esecuzione (ad esempio se WeeChat sembra sia bloccato), è possibile usare gdb con l'id del processo (sostituire _12345_ con il PID del processo weechat): +[source,shell] ---- gdb /usr/bin/weechat 12345 ---- @@ -637,8 +652,9 @@ Poi, come per un crash, usare il comando `bt full`: Per avviare WeeChat, digitare questo comando: +[source,shell] ---- -$ weechat +weechat ---- // TRANSLATION MISSING @@ -868,8 +884,9 @@ This saves the current state in `*.upgrade` files. You can then either reboot or move the whole WeeChat directories (config, data, cache) to another machine, and restart WeeChat later with this command: +[source,shell] ---- -$ weechat --upgrade +weechat --upgrade ---- // TRANSLATION MISSING @@ -3095,8 +3112,9 @@ sezione "opzioni" della configurazione di aspell. Il nome dell'opzione è un parametro di configurazione per aspell. L'elenco delle opzioni disponibili può essere trovato nel terminale col seguente comando: +[source,shell] ---- -$ aspell config +aspell config ---- Ad esempio, per abilitare l'opzione "ignore-case": @@ -3688,8 +3706,9 @@ irc[6][s]://[nick[:password]@]irc.esempio.org[:porta][/#canale][,#canale[...]] Esempio per entrare in _#weechat_ e _#weechat-fr_ sul server _irc.libera.chat_, porta predefinita (6667), con il nick _alice_: +[source,shell] ---- -$ weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr +weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr ---- // TRANSLATION MISSING @@ -3848,9 +3867,10 @@ la 0.3.1. * Importare certificati nella shell: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt +mkdir -p ~/.config/weechat/tls +wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt ---- // TRANSLATION MISSING @@ -3874,10 +3894,11 @@ E possibile concatenare più certificati nel file CAs.pem. * Creare un certificato nella shell: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ---- // TRANSLATION MISSING @@ -3938,8 +3959,9 @@ ECDSA-NIST256P-CHALLENGE mechanism (no password is required on connection). You can generate the key with this command: +[source,shell] ---- -$ openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem +openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem ---- [NOTE] @@ -3948,8 +3970,9 @@ which can also be for example `~/.weechat`. Get the public key (encoded as base64) with this command: +[source,shell] ---- -$ openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 +openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 ---- Connect to the server, identify (for example with "nickserv identify") and set @@ -4019,8 +4042,9 @@ privacy and security on the Internet. Il primo passo consiste nell'installare Tor. Per Debian (e derivate): +[source,shell] ---- -$ sudo apt-get install tor +sudo apt-get install tor ---- In WeeChat è necessario creare un proxy socks5 per il servizio Tor (nome @@ -4977,10 +5001,11 @@ The default path to certificate/key is defined by option È possibile creare un certificato e una chiave privata con i seguenti comandi: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ---- // TRANSLATION MISSING @@ -5133,8 +5158,9 @@ SSH forwarding for relay clients, when other ports cannot be opened. Using OpenSSH: +[source,shell] ---- -$ ssh -L 9000:.weechat/relay_socket user@hostname +ssh -L 9000:.weechat/relay_socket user@hostname ---- This redirects local relay clients connecting on port 9000 to the WeeChat @@ -5229,37 +5255,42 @@ Alcuni esempi: // TRANSLATION MISSING * Change nick on IRC server libera to "newnick": +[source,shell] ---- -$ echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 ---- // TRANSLATION MISSING * Send a message on IRC #weechat channel: +[source,shell] ---- -$ echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- // TRANSLATION MISSING * Send a multiline message on IRC #test channel, if capability "draft/multiline" is enabled on the ergo server: +[source,shell] ---- -$ echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345 ---- // TRANSLATION MISSING * Send a message on current buffer: +[source,shell] ---- -$ echo '*hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo '*hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Inviare due comandi per scaricare/caricare gli script Python (è necessario separarli con "\n"): +[source,shell] ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 +printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 ---- [[fifo_commands]] diff --git a/doc/ja/weechat_dev.ja.adoc b/doc/ja/weechat_dev.ja.adoc index 44773edba..971ef299a 100644 --- a/doc/ja/weechat_dev.ja.adoc +++ b/doc/ja/weechat_dev.ja.adoc @@ -1451,9 +1451,10 @@ Gettext ファイルは _po/_ ディレクトリに入っています。新しい言語の翻訳を始める際は、コマンド `msginit` を使ってください。例えばオランダ語の空ファイルを作成するには: +[source,shell] ---- -$ cd po -$ msginit -i weechat.pot -l nl_NL -o nl.po +cd po +msginit -i weechat.pot -l nl_NL -o nl.po ---- WeeChat @@ -1462,8 +1463,9 @@ WeeChat ソースに変更があった際は、以下のコマンドを Cmake の "build" ディレクトリで実行することで、すべての翻訳を再生成する事が可能です。 +[source,shell] ---- -$ make translations && make update-po +make translations && make update-po ---- その後翻訳できるならば .po ファイルを編集します。 @@ -1472,8 +1474,9 @@ $ make translations && make update-po When done, you *have* to check your file with https://github.com/flashcode/msgcheck[msgcheck ^↗^^]: +[source,shell] ---- -$ msgcheck.py xx.po +msgcheck.py xx.po ---- 新しい翻訳を使うには WeeChat を再コンパイルしてください。 diff --git a/doc/ja/weechat_faq.ja.adoc b/doc/ja/weechat_faq.ja.adoc index 5a0821316..854478fe7 100644 --- a/doc/ja/weechat_faq.ja.adoc +++ b/doc/ja/weechat_faq.ja.adoc @@ -57,12 +57,14 @@ If you still have issues, please report them to the developers. https://brew.sh/[Homebrew ^↗^^] を使うことをお勧めします、ヘルプを見るには: +[source,shell] ---- brew info weechat ---- 以下のコマンドで WeeChat をインストールします: +[source,shell] ---- brew install weechat ---- @@ -390,6 +392,7 @@ There is no option in WeeChat to change the timezone, the environment variable // TRANSLATION MISSING In your shell initialization file or on command line, before starting WeeChat: +[source,shell] ---- export TZ=Asia/Tokyo ---- @@ -700,16 +703,18 @@ to display its code): マウスサポートを端末から確認するには: +[source,shell] ---- -$ printf '\033[?1002h' +printf '\033[?1002h' ---- 端末の最初の文字 (左上) をクリックしてください。" !!#!!" と見えるはずです。 端末のマウスサポートを無効化するには: +[source,shell] ---- -$ printf '\033[?1002l' +printf '\033[?1002l' ---- [[mouse_coords]] @@ -1032,8 +1037,9 @@ for help). それでもだめなら、手作業で (シェルから) スクリプトリストファイルを削除してください: +[source,shell] ---- -$ rm ~/.cache/weechat/script/plugins.xml.gz +rm ~/.cache/weechat/script/plugins.xml.gz ---- // TRANSLATION MISSING @@ -1058,9 +1064,10 @@ If you are not using the XDG directories, the path could be: _~/.weechat/script/ * シェルからスクリプトリストファイルをダウンロードします (必要なら curl をインストールしてください): +[source,shell] ---- -$ cd ~/.cache/weechat/script -$ curl -O https://weechat.org/files/plugins.xml.gz +cd ~/.cache/weechat/script +curl -O https://weechat.org/files/plugins.xml.gz ---- // TRANSLATION MISSING @@ -1068,6 +1075,7 @@ If you're running macOS and the downloaded file has a size of 0 bytes, try to set this variable in your shell initialization file or on command line, before starting WeeChat: +[source,shell] ---- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ---- @@ -1244,6 +1252,7 @@ See https://weechat.org/about/support/[this page ^↗^^]. gdb で WeeChat を実行する場合、以下のエラーが出るかもしれません: +[source,shell] ---- $ gdb /path/to/weechat (gdb) run @@ -1254,6 +1263,7 @@ Cannot find new threads: generic error これを修正するには、以下のコマンドを使って gdb を実行してください (システム上の libpthread と WeeChat へのパスを変更): +[source,shell] ---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /path/to/weechat (gdb) run diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 75273bf1f..d4bbd4048 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -174,9 +174,10 @@ int weechat_plugin_end (struct t_weechat_plugin *plugin); 1 つのファイル "toto.c" からなるプラグインは以下のようにコンパイルします (GNU/Linux の場合): +[source,shell] ---- -$ gcc -fPIC -Wall -c toto.c -$ gcc -shared -fPIC -o toto.so toto.o +gcc -fPIC -Wall -c toto.c +gcc -shared -fPIC -o toto.so toto.o ---- [[load_plugin]] diff --git a/doc/ja/weechat_quickstart.ja.adoc b/doc/ja/weechat_quickstart.ja.adoc index 49c464b75..31f3cd260 100644 --- a/doc/ja/weechat_quickstart.ja.adoc +++ b/doc/ja/weechat_quickstart.ja.adoc @@ -16,8 +16,9 @@ X 用端末エミュレータは rxvt-unicode を推奨します: UTF-8 シェルから起動するには: +[source,shell] ---- -$ weechat +weechat ---- [[help]] diff --git a/doc/ja/weechat_scripting.ja.adoc b/doc/ja/weechat_scripting.ja.adoc index 07cce89a5..c1d0029c7 100644 --- a/doc/ja/weechat_scripting.ja.adoc +++ b/doc/ja/weechat_scripting.ja.adoc @@ -381,9 +381,10 @@ _language/autoload_ ディレクトリ内にリンクを作ってください。 例えば Python の場合: +[source,shell] ---- -$ cd ~/.local/share/weechat/python/autoload -$ ln -s ../script.py +cd ~/.local/share/weechat/python/autoload +ln -s ../script.py ---- [NOTE] diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc index df476d7b3..7855278a4 100644 --- a/doc/ja/weechat_user.ja.adoc +++ b/doc/ja/weechat_user.ja.adoc @@ -244,8 +244,9 @@ Debian および Ubuntu ベースのディストリビューションを使っており、_/etc/apt/sources.list_ ファイルで "deb-src" ソースエントリを指定しているならば、すべての依存関係にあるパッケージを以下のコマンドでインストール可能です: +[source,shell] ---- -# apt-get build-dep weechat +sudo apt-get build-dep weechat ---- // TRANSLATION MISSING @@ -254,22 +255,24 @@ Debian および Ubuntu * システムディレクトリにインストールする場合 (_root_ 特権が必要です): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -$ make -$ sudo make install +mkdir build +cd build +cmake .. +make +sudo make install ---- * 任意のディレクトリ (例えば自分のホームディレクトリ) にインストールする場合: +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/directory -$ make -$ make install +mkdir build +cd build +cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/directory +make +make install ---- CMake に対するオプションを指定するには、以下の書式を使ってください: `-DOPTION=VALUE`。 @@ -411,14 +414,16 @@ List of available options: その他のオプションは以下のコマンドで確認してください: +[source,shell] ---- -$ cmake -LA +cmake -LA ---- Curses インターフェースを使う場合は以下のコマンドを使ってください: +[source,shell] ---- -$ ccmake .. +ccmake .. ---- // TRANSLATION MISSING @@ -432,14 +437,16 @@ $ ccmake .. テストは WeeChat のコンパイル時に有効化しなければいけません: +[source,shell] ---- -$ cmake .. -DENABLE_TESTS=ON +cmake .. -DENABLE_TESTS=ON ---- コンパイル終了後、build ディレクトリでテストを起動してください: +[source,shell] ---- -$ ctest -V +ctest -V ---- [[git_sources]] @@ -450,8 +457,9 @@ $ ctest -V Git ソースを入手するには、以下のコマンドを使ってください: +[source,shell] ---- -$ git clone https://github.com/weechat/weechat.git +git clone https://github.com/weechat/weechat.git ---- その後は、ソースパッケージの説明に従ってください @@ -476,8 +484,9 @@ WeeChat がクラッシュした場合、または WeeChat CMake でコンパイルする場合: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug +cmake .. -DCMAKE_BUILD_TYPE=Debug ---- // TRANSLATION MISSING @@ -488,8 +497,9 @@ $ cmake .. -DCMAKE_BUILD_TYPE=Debug You can additionally enable the address sanitizer, which causes WeeChat to crash immediately in case of problem: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address +cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address ---- // TRANSLATION MISSING @@ -500,8 +510,9 @@ this is not recommended in production. // TRANSLATION MISSING Then once compiled and installed, you must run WeeChat like this: +[source,shell] ---- -$ ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat +ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat ---- // TRANSLATION MISSING @@ -522,12 +533,14 @@ WeeChat バージョン 0.3.8 以下または WeeChat の実行前に core Linux で _bash_ シェルを使っている場合、以下の内容を `~/.bashrc` に追加してください: +[source,shell] ---- ulimit -c unlimited ---- サイズを指定する場合は: +[source,shell] ---- ulimit -c 200000 ---- @@ -550,6 +563,7 @@ https://wiki.archlinux.org/title/Core_dump[wiki page ^↗^^]. 例えば、_weechat_ が _/usr/bin/_ にインストールされ、_core_ ファイルが _/home/user/_ にある場合、以下のコマンドで gdb を起動してください: +[source,shell] ---- gdb /usr/bin/weechat /home/user/core ---- @@ -596,6 +610,7 @@ Copying output to /tmp/crash.txt. 起動している WeeChat をデバッグするには (例えば WeeChat がフリーズしているような場合)、gdb の引数にプロセス番号を与えて起動します (_12345_ は weechat プロセスの PID に変更してください): +[source,shell] ---- gdb /usr/bin/weechat 12345 ---- @@ -611,8 +626,9 @@ gdb /usr/bin/weechat 12345 WeeChat を起動させるには、以下コマンドを実行: +[source,shell] ---- -$ weechat +weechat ---- WeeChat の初回起動時にデフォルトのオプション設定を含む設定ファイルが @@ -844,8 +860,9 @@ This saves the current state in `*.upgrade` files. You can then either reboot or move the whole WeeChat directories (config, data, cache) to another machine, and restart WeeChat later with this command: +[source,shell] ---- -$ weechat --upgrade +weechat --upgrade ---- // TRANSLATION MISSING @@ -2999,8 +3016,9 @@ Speller オプションは aspell 設定の "option" ここで利用するオプション名は aspell 設定オプションと同じものです。オプションのリストはシェルで以下のコマンドを実行することで確認できます: +[source,shell] ---- -$ aspell config +aspell config ---- 例えば、"ignore-case" オプションを有効化するには: @@ -3572,8 +3590,9 @@ irc[6][s]://[nick[:password]@]irc.example.org[:port][/channel][,channel[...]] _alice_ というニックネームを使って _irc.libera.chat_ ホストのデフォルトポート (6667) で稼働中の IRC サーバ上の _#weechat_ と _#weechat-fr_ チャンネルに参加する例: +[source,shell] ---- -$ weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr +weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr ---- // TRANSLATION MISSING @@ -3730,9 +3749,10 @@ irc.server.xxx.tls_verify:: * シェルを使って証明書をインポート: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt +mkdir -p ~/.config/weechat/tls +wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt ---- // TRANSLATION MISSING @@ -3754,10 +3774,11 @@ CAs.pem ファイル中で複数の証明書を連結することもできます * シェルで証明書を作成: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ---- // TRANSLATION MISSING @@ -3810,8 +3831,9 @@ ECDSA-NIST256P-CHALLENGE を使って認証を行うためには、秘密鍵を 鍵を作成するには、以下のコマンドを使ってください: +[source,shell] ---- -$ openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem +openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem ---- // TRANSLATION MISSING @@ -3821,8 +3843,9 @@ which can also be for example `~/.weechat`. 公開鍵を (base64 エンコード形式で) 作成するには、以下のコマンドを使ってください: +[source,shell] ---- -$ openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 +openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 ---- サーバに接続、本人確認 (例えば "nickserv identify" を使って)、nickserv @@ -3892,8 +3915,9 @@ privacy and security on the Internet. 最初に、Tor をインストールしてください。Debian (とその派生ディストリビューション) の場合: +[source,shell] ---- -$ sudo apt-get install tor +sudo apt-get install tor ---- WeeChat で Tor サービスを使った socks5 プロキシを作成してください @@ -4827,10 +4851,11 @@ The default path to certificate/key is defined by option 以下のコマンドを使って証明書と秘密鍵ファイルを作成します: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ---- // TRANSLATION MISSING @@ -4982,8 +5007,9 @@ SSH 転送を許可する際に特に便利です。 OpenSSH を使った例: +[source,shell] ---- -$ ssh -L 9000:.weechat/relay_socket user@hostname +ssh -L 9000:.weechat/relay_socket user@hostname ---- これでポート 9000 番に接続してきたローカルのリレークライアントは @@ -5073,35 +5099,40 @@ allowing for example to send multiline messages: * IRC サーバ libera で使うニックネームを "newnick" に変更する: +[source,shell] ---- -$ echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 ---- * IRC チャンネル #weechat に対してテキストを送信: +[source,shell] ---- -$ echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- // TRANSLATION MISSING * Send a multiline message on IRC #test channel, if capability "draft/multiline" is enabled on the ergo server: +[source,shell] ---- -$ echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * 現在のバッファに対してテキストを送信: +[source,shell] ---- -$ echo '*hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo '*hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Python スクリプトのアンロードとロードを行う 2 つのコマンドを送信 (複数のコマンドは "\n" で分割してください): +[source,shell] ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 +printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 ---- [[fifo_commands]] diff --git a/doc/pl/weechat_faq.pl.adoc b/doc/pl/weechat_faq.pl.adoc index 52da49160..8993cab7b 100644 --- a/doc/pl/weechat_faq.pl.adoc +++ b/doc/pl/weechat_faq.pl.adoc @@ -51,12 +51,14 @@ Jeśli nadal występują jakieś problemy zgłoś je do developerów. Zaleca się użycie https://brew.sh/[Homebrew ^↗^^], pomoc uzyskasz za pomocą komendy: +[source,shell] ---- brew info weechat ---- Możesz zainstalować WeeChat za pomocą komendy: +[source,shell] ---- brew install weechat ---- @@ -378,6 +380,7 @@ być ustawiona na odpowiednią wartość. W pliku inicjalizującym powłokę lub w linii poleceń, przed uruchomieniem WeeChat wpisz: +[source,shell] ---- export TZ=Europe/Warsaw ---- @@ -682,16 +685,18 @@ W zależności od używanego terminfo, mysz może nie być wspierana. Możesz sprawdzić wsparcie myszy w terminalu: +[source,shell] ---- -$ printf '\033[?1002h' +printf '\033[?1002h' ---- Następnie kliknij pierwszy znak w terminalu (górny lewy róg). Powinieneś zobaczyć " !!#!!". Aby wyłączyć wsparcie dla myszy w terminalu: +[source,shell] ---- -$ printf '\033[?1002l' +printf '\033[?1002l' ---- [[mouse_coords]] @@ -1001,8 +1006,9 @@ w tym dokumencie. Jeśli to nie pomoże spróbuj ręcznie usunąć plik z listą skryptów (z poziomu powłoki): +[source,shell] ---- -$ rm ~/.cache/weechat/script/plugins.xml.gz +rm ~/.cache/weechat/script/plugins.xml.gz ---- [NOTE] @@ -1026,15 +1032,17 @@ have to update manually the file yourself to get updates): * w powłoce, z zainstalowanym programem curl: +[source,shell] ---- -$ cd ~/.cache/weechat/script -$ curl -O https://weechat.org/files/plugins.xml.gz +cd ~/.cache/weechat/script +curl -O https://weechat.org/files/plugins.xml.gz ---- Jeśli używasz macOS i pobrany plik ma wielkość 0 bajtów, spróbuj ustawić poniższą zmianną w inicjalizującym powłokę w terminalu lub z linii poleceń przed uruchomieniem WeeChat: +[source,shell] ---- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ---- @@ -1204,6 +1212,7 @@ Zobacz https://weechat.org/about/support/[tą strone ^↗^^]. Podczas uruchamiania WeeChat pod gdb, można spotkać się z takim błędem: +[source,shell] ---- $ gdb /scieżka/do/weechat (gdb) run @@ -1214,6 +1223,7 @@ Cannot find new threads: generic error Żeby to naprawić, można użyć takiej komendy(należy zmienić ścieżki do libpthread oraz WeeChat na właściwe dla naszego systemu): +[source,shell] ---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /ścieżka/do/weechat (gdb) run diff --git a/doc/pl/weechat_quickstart.pl.adoc b/doc/pl/weechat_quickstart.pl.adoc index 9d6122af6..0148c52ce 100644 --- a/doc/pl/weechat_quickstart.pl.adoc +++ b/doc/pl/weechat_quickstart.pl.adoc @@ -17,8 +17,9 @@ klawiszowymi. Wywołaj z terminala: +[source,shell] ---- -$ weechat +weechat ---- [[help]] diff --git a/doc/pl/weechat_scripting.pl.adoc b/doc/pl/weechat_scripting.pl.adoc index 2e91bfad7..af501030f 100644 --- a/doc/pl/weechat_scripting.pl.adoc +++ b/doc/pl/weechat_scripting.pl.adoc @@ -370,9 +370,10 @@ Możesz zrobić dowiązanie w katalogu _język/autoload_ jeśli chcesz automatyc Na przykład dla Pythona: +[source,shell] ---- -$ cd ~/.local/share/weechat/python/autoload -$ ln -s ../skrypt.py +cd ~/.local/share/weechat/python/autoload +ln -s ../skrypt.py ---- [NOTE] diff --git a/doc/pl/weechat_user.pl.adoc b/doc/pl/weechat_user.pl.adoc index 5008ad934..93c7758c3 100644 --- a/doc/pl/weechat_user.pl.adoc +++ b/doc/pl/weechat_user.pl.adoc @@ -224,8 +224,9 @@ Jeśli używasz dystrybujci bazującej na Debianie/Ubuntu, oraz jeśli posiadasz "deb-src" w pliku _/etc/apt/sources.list_, możesz zainstalować wszytkie zależności za pomocą jednej komendy: +[source,shell] ---- -# apt-get build-dep weechat +sudo apt-get build-dep weechat ---- [[build]] @@ -233,22 +234,24 @@ za pomocą jednej komendy: * Instalacja w katalogach systemowych (wymaga uprawnień użytkownika _root_): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -$ make -$ sudo make install +mkdir build +cd build +cmake .. +make +sudo make install ---- * Instalacja w wybranym katalogu (na przykład w katalogu domowym): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -DCMAKE_INSTALL_PREFIX=/ścieżka/do/katalogu -$ make -$ make install +mkdir build +cd build +cmake .. -DCMAKE_INSTALL_PREFIX=/ścieżka/do/katalogu +make +make install ---- Opcje mogą zostać przekazane do CMake, format `-DOPCJA=WARTOŚĆ`. @@ -384,14 +387,16 @@ Lista dostępnych opcji: Pozostałe opcje można wyświetlić poleceniem: +[source,shell] ---- -$ cmake -LA +cmake -LA ---- Lub z interfejsem Curses: +[source,shell] ---- -$ ccmake .. +ccmake .. ---- [[tests]] @@ -404,14 +409,16 @@ Następujące pakiety są *wymagane* do kompilacji testów: Testy muszą być włączone podczas kompilacji WeeChat: +[source,shell] ---- -$ cmake .. -DENABLE_TESTS=ON +cmake .. -DENABLE_TESTS=ON ---- Można je uruchomić po skompilowaniu z katalogu kompilacji: +[source,shell] ---- -$ ctest -V +ctest -V ---- [[git_sources]] @@ -422,8 +429,9 @@ mogą się nie kompilować lub być niestabilne. Zostałeś ostrzeżony! W celu pobrania źródeł z gita, wykonaj poniższą komendę: +[source,shell] ---- -$ git clone https://github.com/weechat/weechat.git +git clone https://github.com/weechat/weechat.git ---- Następnie postępuj zgodnie z instrukcjami dla pakietów źródłowych (zobacz @@ -445,8 +453,9 @@ Jeśli doświadczyłeś awarii, lub chcesz zgłosić przyszłą awarię WeeChat, Jeśli kompilujesz z użyciem CMake: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug +cmake .. -DCMAKE_BUILD_TYPE=Debug ---- [[address_sanitizer]] @@ -455,8 +464,9 @@ $ cmake .. -DCMAKE_BUILD_TYPE=Debug Możesz dodatowo włączyć weryfikację adresów, co spowoduje natychmiastową awarię WeeChat w przypadku wystąpienia problemu: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address +cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address ---- [WARNING] @@ -465,8 +475,9 @@ nie powinno się tego używać do codziennej pracy. Po skompilowaniu i zainstalowaniu należy uruchamiać WeeChat w taki sposób: +[source,shell] ---- -$ ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat +ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat ---- W przypadku awarii plik logi znajdą się w pliku `asan.log`. @@ -486,12 +497,14 @@ startem WeeChat, możesz użyć komendy `ulimit`. Na przykład pod Linuksem używając powłoki _bash_, dodaj to do pliku `~/.bashrc`: +[source,shell] ---- ulimit -c unlimited ---- Lub z maksymalnym rozmiarem: +[source,shell] ---- ulimit -c 200000 ---- @@ -513,6 +526,7 @@ https://wiki.archlinux.org/title/Core_dump[stronie wiki ^↗^^]. Na przykład jeśli _weechat_ jest zainstalowany w _/usr/bin/_ i plik _core_ znajduje się w _/home/user/_, uruchom gdb za pomocą tej komendy: +[source,shell] ---- gdb /usr/bin/weechat /home/user/core ---- @@ -560,6 +574,7 @@ W celu debugowania działającego WeeChat (na przykład kiedy WeeChat wydaje si zawieszony), można użyć gdb podając in procesu (zastąp _12345_ numerem PID procesu weechat): +[source,shell] ---- gdb /usr/bin/weechat 12345 ---- @@ -575,8 +590,9 @@ Następnie jak w przypadku awarii, użyj polecenia `bt full`: Żeby uruchomić WeeChat, wykonaj polecenie: +[source,shell] ---- -$ weechat +weechat ---- Podczas pierwszego uruchomienia WeeChat tworzone są domyślne pliki konfiguracyjne @@ -793,8 +809,9 @@ Zapisuje to obecny stan w plikach `*.upgrade`. Możesz następnie wykonać resta lub przenieść cały katalog WeeChat (konfiguracja, dane, cache) na inną maszynę, następnie uruchomić WeeChat za pomocą polecenia: +[source,shell] ---- -$ weechat --upgrade +weechat --upgrade ---- [[restart_after_upgrade]] @@ -2824,8 +2841,9 @@ dla konfiguracji aspell. Nazwa opcji to nazwa opcji konfiguracyjnej aspell. Listę opcji można uzyskać wykonując w powłoce następującą komendę: +[source,shell] ---- -$ aspell config +aspell config ---- Na przykład, aby włączyć opcję "ignore-case": @@ -3391,8 +3409,9 @@ irc[6][s]://[nick[:hasło]@]adres.serwera.irc[:port][/kanał][,kanał[...]] Przykład wejścia na kanały _#weechat_ i _#weechat-fr_ na serwerze _irc.libera.chat_, na domyślnym porcie (6667), z nickiem _alice_: +[source,shell] ---- -$ weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr +weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr ---- [[irc_servers]] @@ -3548,9 +3567,10 @@ się nie powieść, nawet jeśli wszystko było OK w wersjach przed 0.3.1. * Import certyfikatu w kosoli: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt +mkdir -p ~/.config/weechat/tls +wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt ---- [NOTE] @@ -3571,10 +3591,11 @@ Możliwe jest umieszczenie wielu certyfikatów w pliku CAs.pem. * Tworzenie certyfikatu w konsoli: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ---- [NOTE] @@ -3622,8 +3643,9 @@ ECDSA-NIST256P-CHALLENGE (hasło nie potrzebne do połączenia). Klucz można wygenerować za pomocą komendy: +[source,shell] ---- -$ openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem +openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem ---- [NOTE] @@ -3632,8 +3654,9 @@ który może być ustawiony na przykład na `~/.weechat`. Klucz publiczny (zakodowany za pomocą base64) uzyskujemy wywołując komendę: +[source,shell] ---- -$ openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 +openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 ---- Połącz się do serwera, zidentyfikuj (na przykład za pomocą "nickserv identify") @@ -3700,8 +3723,9 @@ i bezpieczeństwa w Internecie. Pierwszym krokiem jest instalacja Tora. Dla Debiana (i pochodnych): +[source,shell] ---- -$ sudo apt-get install tor +sudo apt-get install tor ---- W WeeChat należy stworzyć proxy socks5 dla serwisu Tor (nazwa hosta/IP i port @@ -4624,10 +4648,11 @@ Domyślna ścieżka do certyfikatów/kluczy jest zdefiniowana przez opcję Możesz utworzyć certyfikat i klucz prywatny wykonując poniższe komendy: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ---- [NOTE] @@ -4683,7 +4708,7 @@ za pomocą tych komend: ---- [[relay_api_protocol]] -=== Protokół API +=== Protokół API Wtyczka Relay może wysyłać dane do zdalnego WeeChat lub interfejsu za pomocą protokołu HTTP REST API. @@ -4777,8 +4802,9 @@ tunelować klienty przez SSH, w przypadku, kiedy inne porty nie moga być otwier Za pomocą OpenSSH: +[source,shell] ---- -$ ssh -L 9000:.weechat/relay_socket user@hostname +ssh -L 9000:.weechat/relay_socket user@hostname ---- Przekerowuje to połączenia lokalnych klientów łączących się na port 9000 do intancji @@ -4865,34 +4891,39 @@ Kilka przykładów: * Zmiana nicka na serwerze IRC libera na "newnick": +[source,shell] ---- -$ echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Wysłanie wiadomości na kanał IRC #weechat: +[source,shell] ---- -$ echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Wysyłanie wielolinowych wiadomości na kanał IRC #test, jeśli właściwość "draft/multiline" jest włączona na serwerze ergo: +[source,shell] ---- -$ echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.ergo.#test \hello\n...on two lines!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Wysłanie wiadomości do obecnego bufora: +[source,shell] ---- -$ echo '*hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo '*hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Wysłanie dwóch komend do wyładowania/przeładowania skryptów Python (należy oddzielić je za pomocą "\n"): +[source,shell] ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 +printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 ---- [[fifo_commands]] diff --git a/doc/ru/weechat_quickstart.ru.adoc b/doc/ru/weechat_quickstart.ru.adoc index e5c572cd6..a7d6d701b 100644 --- a/doc/ru/weechat_quickstart.ru.adoc +++ b/doc/ru/weechat_quickstart.ru.adoc @@ -18,8 +18,9 @@ Запуск из шелла: +[source,shell] ---- -$ weechat +weechat ---- // TRANSLATION MISSING diff --git a/doc/sr/weechat_dev.sr.adoc b/doc/sr/weechat_dev.sr.adoc index b19b2d764..5274b9610 100644 --- a/doc/sr/weechat_dev.sr.adoc +++ b/doc/sr/weechat_dev.sr.adoc @@ -1267,17 +1267,19 @@ Gettext фајлови се налазе у _po/_ директоријуму. Ако желите да иницијализујете нови језик, употребите команду `msginit`. На пример, да бисте креирали нови фајл који је спреман за превод на холандски: +[source,shell] ---- -$ cd po -$ msginit -i weechat.pot -l nl_NL -o nl.po +cd po +msginit -i weechat.pot -l nl_NL -o nl.po ---- Базни језик за програм WeeChat је енглески, тако да се подразумева да перфектно разумете енглески како бисте могли да урадите превод на свој језик. Након измена у изворним фајловима, можете да регенеришете све фајлове превода следећом командом у CMake „build” директоријуму: +[source,shell] ---- -$ make translations && make update-po +make translations && make update-po ---- Затим можете да уређујте .po фајлове (ако можете да преводите на језик). @@ -1285,8 +1287,9 @@ $ make translations && make update-po Када завршите, *морате* да проверите свој фајл са https://github.com/flashcode/msgcheck[msgcheck ^↗^^]: +[source,shell] ---- -$ msgcheck.py xx.po +msgcheck.py xx.po ---- И након тога можете да рекомпајлирате програм WeeChat тако да користи нове преводе. diff --git a/doc/sr/weechat_faq.sr.adoc b/doc/sr/weechat_faq.sr.adoc index f492af02c..3319ec81a 100644 --- a/doc/sr/weechat_faq.sr.adoc +++ b/doc/sr/weechat_faq.sr.adoc @@ -50,12 +50,14 @@ WeeChat мора да се компајлира са CMake. Препоручује се употребите https://brew.sh/[Homebrew ^↗^^], помоћ можете добити са: +[source,shell] ---- brew info weechat ---- Програм WeeChat можете да инсталирате следећом командом: +[source,shell] ---- brew install weechat ---- @@ -326,6 +328,7 @@ _прозор_ је површина екрана која приказује б У иницијализационом фајлу свог командног окружења или на командној линији, пре покретања програма WeeChat: +[source,shell] ---- export TZ=America/New_York ---- @@ -610,16 +613,18 @@ UXTerm*metaSendsEscape: true Подршку за миша можете тестирати у терминалу са: +[source,shell] ---- -$ printf '\033[?1002h' +printf '\033[?1002h' ---- па затим кликните на први карактер терминала (горњи леви). Требало би да видите „ !!#!!”. Ако желите да искључите употребу миша у терминалу: +[source,shell] ---- -$ printf '\033[?1002l' +printf '\033[?1002l' ---- [[mouse_coords]] @@ -895,8 +900,9 @@ link:weechat_user.sr.html#max_hotlist_level_nicks[hotlist_max_level_nicks_add ^ Ако још увек не функционише, покушајте ручно да обришете фајл са скриптама (из свог командног окружења): +[source,shell] ---- -$ rm ~/.cache/weechat/script/plugins.xml.gz +rm ~/.cache/weechat/script/plugins.xml.gz ---- [NOTE] @@ -918,15 +924,17 @@ $ rm ~/.cache/weechat/script/plugins.xml.gz * у вашем командном окружењу, са инсталираним програмом curl: +[source,shell] ---- -$ cd ~/.cache/weechat/script -$ curl -O https://weechat.org/files/plugins.xml.gz +cd ~/.cache/weechat/script +curl -O https://weechat.org/files/plugins.xml.gz ---- Ако користите macOS и величина преузетог фајла је 0 бајтова, покушајте да поставите следећу променљиву у иницијализациони фајл ваше љуске или у командној линији, пре покретања WeeChat: +[source,shell] ---- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES ---- @@ -1079,6 +1087,7 @@ WeeChat верзија на новом уређају мора да буде в Када програм WeeChat покренете под gdb, можете добити следећу грешку: +[source,shell] ---- $ gdb /путања/до/програма/weechat (gdb) run @@ -1088,6 +1097,7 @@ Cannot find new threads: generic error Да бисте ово исправили, покрените gdb овом командом (замените путању до libpthread и WeeChat са путањама на вашем систему): +[source,shell] ---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /путања/до/програма/weechat (gdb) run diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index cdb21b452..f146bd383 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -151,9 +151,10 @@ int weechat_plugin_end (struct t_weechat_plugin *plugin); Да бисте компајлирали додатак који има само један фајл „toto.c” (на систему GNU/Linux): +[source,shell] ---- -$ gcc -fPIC -Wall -c toto.c -$ gcc -shared -fPIC -o toto.so toto.o +gcc -fPIC -Wall -c toto.c +gcc -shared -fPIC -o toto.so toto.o ---- [[load_plugin]] diff --git a/doc/sr/weechat_quickstart.sr.adoc b/doc/sr/weechat_quickstart.sr.adoc index 648f8255a..450b2eed3 100644 --- a/doc/sr/weechat_quickstart.sr.adoc +++ b/doc/sr/weechat_quickstart.sr.adoc @@ -15,8 +15,9 @@ Покретање из вашег командног окружења: +[source,shell] ---- -$ weechat +weechat ---- [[help]] diff --git a/doc/sr/weechat_scripting.sr.adoc b/doc/sr/weechat_scripting.sr.adoc index ec3666dbb..f8b42fddc 100644 --- a/doc/sr/weechat_scripting.sr.adoc +++ b/doc/sr/weechat_scripting.sr.adoc @@ -341,9 +341,10 @@ weechat_print('', 'Поздрав од PHP скрипте!'); На пример, са језиком Python: +[source,shell] ---- -$ cd ~/.local/share/weechat/python/autoload -$ ln -s ../script.py +cd ~/.local/share/weechat/python/autoload +ln -s ../script.py ---- [NOTE] diff --git a/doc/sr/weechat_user.sr.adoc b/doc/sr/weechat_user.sr.adoc index 59da8fc58..48f24c892 100644 --- a/doc/sr/weechat_user.sr.adoc +++ b/doc/sr/weechat_user.sr.adoc @@ -215,8 +215,9 @@ WeeChat мора да се изгради са CMake. Ако користите дистрибуцију базирану на Debian/Ubuntu и ако имате неке „deb-src” изворне ставке у фајлу _/etc/apt/sources.list_, можете инсталирати све зависности командом: +[source,shell] ---- -# apt-get build-dep weechat +sudo apt-get build-dep weechat ---- [[build]] @@ -224,22 +225,24 @@ WeeChat мора да се изгради са CMake. * Инсталација у системске директоријуме (неопходне су _root_ привилегије): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -$ make -$ sudo make install +mkdir build +cd build +cmake .. +make +sudo make install ---- * Инсталација у директоријум по жељи (на пример, у ваш почетни): +[source,shell] ---- -$ mkdir build -$ cd build -$ cmake .. -DCMAKE_INSTALL_PREFIX=/путања/до/директоријума -$ make -$ make install +mkdir build +cd build +cmake .. -DCMAKE_INSTALL_PREFIX=/путања/до/директоријума +make +make install ---- Можете да користите опције за CMake, у формату: `-DОПЦИЈА=ВРЕДНОСТ`. @@ -375,14 +378,16 @@ $ make install Остале команде могу да се прикажу следећом командом: +[source,shell] ---- -$ cmake -LA +cmake -LA ---- или са Curses интерфејсом: +[source,shell] ---- -$ ccmake .. +ccmake .. ---- [[tests]] @@ -395,14 +400,16 @@ $ ccmake .. Када се компајлира програм WeeChat, тестови морају да се укључе: +[source,shell] ---- -$ cmake .. -DENABLE_TESTS=ON +cmake .. -DENABLE_TESTS=ON ---- Након компајлирања могу да се покрену из директоријума у који је изграђен програм: +[source,shell] ---- -$ ctest -V +ctest -V ---- [[git_sources]] @@ -412,8 +419,9 @@ $ ctest -V Да бисте преузели Git изворе, извршите следећу команду: +[source,shell] ---- -$ git clone https://github.com/weechat/weechat.git +git clone https://github.com/weechat/weechat.git ---- Затим следите инструкције за <>). @@ -434,8 +442,9 @@ $ git clone https://github.com/weechat/weechat.git Ако компајлирате са CMake: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug +cmake .. -DCMAKE_BUILD_TYPE=Debug ---- [[address_sanitizer]] @@ -443,8 +452,9 @@ $ cmake .. -DCMAKE_BUILD_TYPE=Debug Можете и да укључите чистач адресе, помоћу кога се програм WeeChat тренутно руши чим дође до неког проблема: +[source,shell] ---- -$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address +cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_CXX_FLAGS=-fsanitize=address -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address ---- [WARNING] @@ -452,8 +462,9 @@ $ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_C Затим када се компајлира и инсталира, програм WeeChat морате покренути на следећи начин: +[source,shell] ---- -$ ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat +ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat ---- У случају краха, дневник се налази у фајлу `asan.log`. @@ -471,12 +482,14 @@ $ ASAN_OPTIONS="detect_odr_violation=0 log_path=asan.log" weechat На пример, на Linux систему са _bash_ командним окружењем, додајте следећу линију у свој `~/.bashrc`: +[source,shell] ---- ulimit -c unlimited ---- Или поставите макс величину: +[source,shell] ---- ulimit -c 200000 ---- @@ -493,6 +506,7 @@ https://wiki.archlinux.org/title/Core_dump[вики страницу ^↗^^]. На пример, ако је _weechat_ инсталиран у _/usr/bin/_ а _core_ фајл се налази у _/home/user/_, онда покрените gdb следећом командом: +[source,shell] ---- gdb /usr/bin/weechat /home/user/core ---- @@ -537,6 +551,7 @@ Copying output to /tmp/crash.txt. Ако желите да вршите дибаг програма WeeChat који се извршава (на пример, ако изгледа да је програм WeeChat блокиран), можете употребите gdb са id процеса (замените _12345_ са PID weechat процеса): +[source,shell] ---- gdb /usr/bin/weechat 12345 ---- @@ -552,8 +567,9 @@ gdb /usr/bin/weechat 12345 Ако желите да покренете програм WeeChat, задајте следећу команду: +[source,shell] ---- -$ weechat +weechat ---- Када по први пут покренете програм WeeChat, у директоријуму _~/.config/weechat_ се креирају подразумевани конфигурациони фајлови са подразумеваним опцијама и вредностима (погледајте <>). @@ -745,8 +761,9 @@ WeeChat подразумевано користи XDG директоријуме Ово чува тренутно стање у `*.upgrade` фајлове. Након тога можете или да поново покренете машину, или да комплетне WeeChat директоријуме (config, data, cache) преместите на неку другу машину и касније покренете програм WeeChat следећом командом: +[source,shell] ---- -$ weechat --upgrade +weechat --upgrade ---- [[restart_after_upgrade]] @@ -2658,8 +2675,9 @@ Spell додатак вам омогућава да проверите прав Име опције је aspell конфигурациона опција. Листа опција може да се пронађе у командном окружењу помоћу следеће команде: +[source,shell] ---- -$ aspell config +aspell config ---- На пример, ако желите да укључите опцију „ignore-case”: @@ -3180,8 +3198,9 @@ irc[6][s]://[надимак[:лозинка]@]irc.пример.org[:порт][/ Пример за приступ каналима _#weechat_ и _#weechat-fr_ на серверу _irc.libera.chat_,подразумевани порт (6667), користећи надимак _alice_: +[source,shell] ---- -$ weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr +weechat irc://alice@irc.libera.chat/#weechat,#weechat-fr ---- [[irc_servers]] @@ -3331,9 +3350,10 @@ irc.server.xxx.tls_verify:: * Увоз сертификата у командном окружењу: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt +mkdir -p ~/.config/weechat/tls +wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.crt ---- [NOTE] @@ -3353,10 +3373,11 @@ $ wget -O ~/.config/weechat/tls/CAs.pem https://www.spi-inc.org/ca/spi-cacert.cr * Креирајте сертификат у командном окружењу: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ---- [NOTE] @@ -3401,8 +3422,9 @@ https://www.oftc.net/NickServ/CertFP/[ову страницу ^↗^^]. Кључ можете да генеришете следећом командом: +[source,shell] ---- -$ openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem +openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem ---- [NOTE] @@ -3410,8 +3432,9 @@ $ openssl ecparam -genkey -name prime256v1 -out ~/.config/weechat/ecdsa.pem Набавите јавни кључ (кодиран у base64) следећом командом: +[source,shell] ---- -$ openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 +openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64 ---- Повежите се са сервером, идентификујте се (на пример са „nickserv identify”) и поставите свој јавни кључ у налог, користећи nickserv (замените base64 вредност са вредношћу вашег јавног кључа): @@ -3475,8 +3498,9 @@ $ openssl ec -noout -text -conv_form compressed -in ~/.config/weechat/ecdsa.pem Најпре морате да инсталирате Tor. За Debian (и изведене из њега): +[source,shell] ---- -$ sudo apt-get install tor +sudo apt-get install tor ---- У програму WeeChat морате да додате socks5 прокси за Tor сервис (имехоста/IP и порт зависе од ваше Tor конфигурације): @@ -4365,10 +4389,11 @@ TLS можете да користите креирањем сертификат Сертификат и приватни кључ можете да креирате следећим командама: +[source,shell] ---- -$ mkdir -p ~/.config/weechat/tls -$ cd ~/.config/weechat/tls -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +mkdir -p ~/.config/weechat/tls +cd ~/.config/weechat/tls +openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ---- [NOTE] @@ -4499,8 +4524,9 @@ URI мора да се завршава са „/weechat” за _irc_ и _weech Употребом OpenSSH: +[source,shell] ---- -$ ssh -L 9000:.weechat/relay_socket корисник@имехоста +ssh -L 9000:.weechat/relay_socket корисник@имехоста ---- Ово преусмерава локалне релеј клијенте који се повезују на порт 9000 на инстанцу програма WeeChat која се извршава на машини „имехоста”. @@ -4582,33 +4608,38 @@ FIFO пајп се налази у WeeChat директоријуму за вр * Измена надимка на IRC серверу libera на „newnick”: +[source,shell] ---- -$ echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Слање поруке на #weechat IRC канал: +[source,shell] ---- -$ echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Слање вишелинијске поруке на IRC канал #test, у случају да је могућност „draft/multiline” укључена на ergo серверу: +[source,shell] ---- -$ echo 'irc.ergo.#test \здраво\n...на две линије!' >/run/user/1000/weechat/weechat_fifo_12345 +echo 'irc.ergo.#test \здраво\n...на две линије!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Слање поруке у текући бафер: +[source,shell] ---- -$ echo '*здраво!' >/run/user/1000/weechat/weechat_fifo_12345 +echo '*здраво!' >/run/user/1000/weechat/weechat_fifo_12345 ---- * Слање две команде за уклањање из меморије/поновно учитавање Python скрипти (морате да их раздвојите са „\n”): +[source,shell] ---- -$ printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 +printf '%b' '*/python unload\n*/python autoload\n' >/run/user/1000/weechat/weechat_fifo_12345 ---- [[fifo_commands]]