mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
Compare commits
143 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 951c030082 | |||
| 5def4f72fe | |||
| 3db2f71112 | |||
| 09917a807b | |||
| 334f88ae2c | |||
| 2e14645691 | |||
| 2c0bbdf9b9 | |||
| 5839df90e7 | |||
| 6082453002 | |||
| d0568dce79 | |||
| 00a873dda0 | |||
| 18e2badfbd | |||
| 120b048efb | |||
| 600e438b90 | |||
| bf3a8628ae | |||
| 1478ecd77d | |||
| 5c9d9bc8fc | |||
| ff00323363 | |||
| 1d2e5ce700 | |||
| 2eebe241ab | |||
| e93cebf02c | |||
| c3db4946b2 | |||
| 86d4da2fd1 | |||
| e39ef93903 | |||
| 9663f79746 | |||
| e0b7d2a645 | |||
| 99bb1454a4 | |||
| caa7af253a | |||
| 36300c763d | |||
| e3ffef457f | |||
| 6d11468059 | |||
| 6b19987e7f | |||
| d91039ebd0 | |||
| 2e6249588f | |||
| 847ce17718 | |||
| 15e2da3aac | |||
| ca22e49041 | |||
| 764b309e92 | |||
| c0402bce52 | |||
| 9fe5fa23a0 | |||
| e8a335a3e3 | |||
| e9983821e7 | |||
| b25a9b11a0 | |||
| f5038bccbc | |||
| 20b2bdedc2 | |||
| 95366c37b7 | |||
| 80bb54fed8 | |||
| 68d452b559 | |||
| 357b7e0d55 | |||
| d8106f863a | |||
| 2e570c599b | |||
| 8280a3b65b | |||
| f7cf044f33 | |||
| 98aca3343a | |||
| d9ee4a3c13 | |||
| 19d84e975e | |||
| c33a28cfca | |||
| 145423c11f | |||
| 4865fe07e2 | |||
| cc163a0e7e | |||
| 17e7796669 | |||
| 83c4b940a6 | |||
| 8c1379e820 | |||
| e86e558f3f | |||
| 718a317cfb | |||
| c275f9d994 | |||
| 9285afc3e2 | |||
| c7d21a3ea6 | |||
| 1b54cd24ed | |||
| d3a9e4e74b | |||
| 8fd4a80af8 | |||
| 091a17b138 | |||
| e89d6d69ad | |||
| 3c9eb6dcac | |||
| 8e9692809d | |||
| 6388d36858 | |||
| 8198aade2e | |||
| ca6e483cdc | |||
| 547e2b934e | |||
| 07deaf97ec | |||
| daef5971ae | |||
| 04aea1bcb5 | |||
| 4b7be27028 | |||
| 68c70e5538 | |||
| 865dd61d31 | |||
| b53f3c2db8 | |||
| 56698151db | |||
| 1285a7d391 | |||
| 36b62cfc5e | |||
| d97fed80cb | |||
| 80ca209e70 | |||
| d302294723 | |||
| 60422ca6b1 | |||
| 9d3388b09e | |||
| d10af1037b | |||
| 10b4fffaca | |||
| c48dee3211 | |||
| cf726265d1 | |||
| 8b2cdf3032 | |||
| 3523b5e4e2 | |||
| c6c420c698 | |||
| cfe34388fb | |||
| 3eaa1a3a6e | |||
| de88cd3b58 | |||
| b88582c7ec | |||
| cab9496a70 | |||
| c0c837b1be | |||
| 7c30dbcf05 | |||
| d665e2d489 | |||
| 16346255f1 | |||
| 2a7f557f05 | |||
| 8e8e982af6 | |||
| 883c12dec2 | |||
| ad5fde5966 | |||
| 119664d090 | |||
| 97ede70307 | |||
| c26ff6c51b | |||
| 9e34a0e917 | |||
| befcd09d63 | |||
| 8aba934c50 | |||
| 3b88065266 | |||
| ce2c4b74a2 | |||
| d3d0948e2e | |||
| 68dce2b47a | |||
| b45d2105a5 | |||
| 74c63c0541 | |||
| 770d87c3d6 | |||
| 099e11d7b8 | |||
| 8af3a4cef8 | |||
| 7226b005e9 | |||
| 45509e1cd1 | |||
| cdb4823fad | |||
| 82f0b3b121 | |||
| e6409355b6 | |||
| e2675f5afe | |||
| e6388c1d1a | |||
| 9779f56125 | |||
| 818a4c95a9 | |||
| 8f43dceedf | |||
| 05c60a2292 | |||
| 798c7a5262 | |||
| 732f24b6ba | |||
| 0fc0071297 |
@@ -92,7 +92,7 @@ env:
|
||||
ruby
|
||||
rubygem-asciidoctor
|
||||
sudo
|
||||
tcl87
|
||||
tcl86
|
||||
zstd
|
||||
|
||||
jobs:
|
||||
@@ -381,9 +381,7 @@ jobs:
|
||||
/usr/local/bin/python3.11 \
|
||||
/usr/local/bin/python3.11-config \
|
||||
;
|
||||
# workaround for https://github.com/actions/runner-images/issues/10984
|
||||
brew uninstall --ignore-dependencies --force pkg-config@0.29.2
|
||||
brew install asciidoctor aspell cjson guile lua ruby
|
||||
brew install asciidoctor aspell cjson guile lua pkg-config ruby
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ Alphabetically:
|
||||
- Christian Heinz
|
||||
- Christopher O'Neill (deltafire)
|
||||
- coypoop
|
||||
- Daniel Lublin
|
||||
- Danilo Spinella
|
||||
- David Flatz
|
||||
- Dmitry Kobylin
|
||||
@@ -63,6 +64,7 @@ Alphabetically:
|
||||
- jesopo
|
||||
- Jim Ramsay (lack)
|
||||
- Jiri Golembiovsky (GolemJ)
|
||||
- Joe Hermaszewski
|
||||
- Joey Pabalinas (alyptik)
|
||||
- Johan Rylander
|
||||
- Johannes Kuhn
|
||||
|
||||
@@ -1,5 +1,81 @@
|
||||
# WeeChat ChangeLog
|
||||
|
||||
## Version 4.6.3 (2025-05-11)
|
||||
|
||||
### Fixed
|
||||
|
||||
- core: fix integer overflow with decimal numbers in calculation of expression
|
||||
- core: fix integer overflow in base32 encoding/decoding
|
||||
- core: fix integer overflow in function util_version_number
|
||||
- core: fix buffer overflow in function util_parse_time
|
||||
- core: fix buffer overflow in function eval_syntax_highlight_colorize
|
||||
- core: fix buffer overflow in function eval_string_base_encode
|
||||
- core: fix buffer overflow in function eval_string_range_chars
|
||||
- core: fix memory leak in function util_parse_delay
|
||||
|
||||
## Version 4.6.2 (2025-04-18)
|
||||
|
||||
### Fixed
|
||||
|
||||
- core: fix write of weechat.log to stdout with `weechat-headless --stdout` ([#2247](https://github.com/weechat/weechat/issues/2247))
|
||||
- core: add refresh of window title on buffer switch, when option weechat.look.window_title is set
|
||||
|
||||
## Version 4.6.1 (2025-04-09)
|
||||
|
||||
### Fixed
|
||||
|
||||
- core: consider all keys are safe in cursor context ([#2244](https://github.com/weechat/weechat/issues/2244))
|
||||
- irc: display nick changes and quit messages when option irc.look.ignore_tag_messages is enabled ([#2241](https://github.com/weechat/weechat/issues/2241))
|
||||
- perl: fix build when multiplicity is not available ([#2243](https://github.com/weechat/weechat/issues/2243))
|
||||
|
||||
## Version 4.6.0 (2025-03-23)
|
||||
|
||||
### Changed
|
||||
|
||||
- core: add option `-v` to display upgrades in command `/version`
|
||||
- api: add property `keep_spaces_right` in function hook_set to keep trailing spaces in command arguments
|
||||
- core, irc, alias, xfer: keep spaces at the end of some commands, where trailing spaces are important
|
||||
- irc: add option `-connected` in command `/server list|listfull`
|
||||
- buflist: apply option buflist.look.nick_prefix_empty also on private and list buffers
|
||||
- xfer: compute speed and ETA with microsecond precision ([#665](https://github.com/weechat/weechat/issues/665))
|
||||
|
||||
### Added
|
||||
|
||||
- core: add command `/pipe`
|
||||
- core: add option `whitespace` in command `/debug`, add options weechat.look.whitespace_char and weechat.look.tab_whitespace_char ([#947](https://github.com/weechat/weechat/issues/947))
|
||||
- core: add option weechat.completion.nick_ignore_words ([#1143](https://github.com/weechat/weechat/issues/1143))
|
||||
- spell: add CMake options ASPELL_DICT_DIR and ENCHANT_MYSPELL_DICT_DIR to override dictionaries locations ([#1174](https://github.com/weechat/weechat/issues/1174))
|
||||
- api: add function completion_set
|
||||
- relay/api: add resource `POST /api/completion` ([#2207](https://github.com/weechat/weechat/issues/2207))
|
||||
- relay/api: add default key `Alt`+`Ctrl`+`l` (L) to toggle between remote and local commands on remote buffers, add option `togglecmd` in command `/remote`, add options relay.api.remote_input_cmd_local and relay.api.remote_input_cmd_remote ([#2148](https://github.com/weechat/weechat/issues/2148))
|
||||
|
||||
### Fixed
|
||||
|
||||
- relay: fix crash after `/upgrade` when relay clients are connected
|
||||
- core: save configuration files as UTF-8 when the locale is wrong
|
||||
- api: fix creation of empty buffer in function infolist_new_var_buffer
|
||||
- core: fix build with gcc 15 ([#2229](https://github.com/weechat/weechat/issues/2229), [#2230](https://github.com/weechat/weechat/issues/2230))
|
||||
- core: fix detection of dl library ([#2218](https://github.com/weechat/weechat/issues/2218))
|
||||
- logger: fix path displayed when the logs directory can not be created
|
||||
- perl: fix build with Perl < 5.7.29 ([#2219](https://github.com/weechat/weechat/issues/2219), [#2220](https://github.com/weechat/weechat/issues/2220))
|
||||
- python: enable subinterpreters ([#2222](https://github.com/weechat/weechat/issues/2222))
|
||||
|
||||
## Version 4.5.2 (2025-02-20)
|
||||
|
||||
### Fixed
|
||||
|
||||
- core: fix build with gcc 15 ([#2229](https://github.com/weechat/weechat/issues/2229), [#2230](https://github.com/weechat/weechat/issues/2230))
|
||||
|
||||
## Version 4.5.1 (2024-12-23)
|
||||
|
||||
### Fixed
|
||||
|
||||
- relay: fix crash after `/upgrade` when relay clients are connected
|
||||
- api: fix creation of empty buffer in function infolist_new_var_buffer
|
||||
- core: fix detection of dl library ([#2218](https://github.com/weechat/weechat/issues/2218))
|
||||
- logger: fix path displayed when the logs directory can not be created
|
||||
- perl: fix build with Perl < 5.7.29 ([#2219](https://github.com/weechat/weechat/issues/2219), [#2220](https://github.com/weechat/weechat/issues/2220))
|
||||
|
||||
## Version 4.5.0 (2024-12-15)
|
||||
|
||||
### Changed
|
||||
|
||||
+12
-4
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2007-2008 Julien Louis <ptitlouis@sysif.net>
|
||||
# Copyright (C) 2008-2009 Emmanuel Bouthenot <kolter@openics.org>
|
||||
#
|
||||
@@ -166,6 +166,16 @@ if(ENABLE_TESTS AND NOT ENABLE_HEADLESS)
|
||||
message(FATAL_ERROR "Headless mode is required for tests.")
|
||||
endif()
|
||||
|
||||
# Set this to override aspell's dictionaries directory
|
||||
if(ASPELL_DICT_DIR)
|
||||
add_definitions(-DASPELL_DICT_DIR="${ASPELL_DICT_DIR}")
|
||||
endif()
|
||||
|
||||
# Set this to override the myspell dictionaries directory when using enchant
|
||||
if(ENCHANT_MYSPELL_DICT_DIR)
|
||||
add_definitions(-DENCHANT_MYSPELL_DICT_DIR="${ENCHANT_MYSPELL_DICT_DIR}")
|
||||
endif()
|
||||
|
||||
# option WEECHAT_HOME
|
||||
set(WEECHAT_HOME "${WEECHAT_HOME}" CACHE
|
||||
STRING "Force a single WeeChat home directory for config, logs, scripts, etc."
|
||||
@@ -247,9 +257,7 @@ find_library(DL_LIBRARY
|
||||
PATHS /lib /usr/lib /usr/libexec /usr/local/lib /usr/local/libexec
|
||||
)
|
||||
if(DL_LIBRARY)
|
||||
string(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}")
|
||||
set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}")
|
||||
list(APPEND EXTRA_LIBS dl)
|
||||
list(APPEND EXTRA_LIBS ${DL_LIBRARY})
|
||||
endif()
|
||||
|
||||
add_subdirectory(icons)
|
||||
|
||||
@@ -48,7 +48,7 @@ WeeChat is following a "practical" semantic versioning, see file [CONTRIBUTING.m
|
||||
|
||||
## Copyright
|
||||
|
||||
Copyright © 2003-2024 [Sébastien Helleu](https://github.com/flashcode)
|
||||
Copyright © 2003-2025 [Sébastien Helleu](https://github.com/flashcode)
|
||||
|
||||
This file is part of WeeChat, the extensible chat client.
|
||||
|
||||
|
||||
@@ -7,6 +7,27 @@ When upgrading from version X to Y, please read and apply all instructions from
|
||||
|
||||
For a list of all changes in each version, please see [CHANGELOG.md](CHANGELOG.md).
|
||||
|
||||
## Version 4.6.3
|
||||
|
||||
### API function util_version_number
|
||||
|
||||
An integer overflow has been fixed in the function
|
||||
[util_version_number](https://weechat.org/doc/weechat/plugin/#_util_version_number)
|
||||
which now returns a version up to "127.255.255.255" (0x7FFFFFFF).
|
||||
|
||||
## Version 4.6.0
|
||||
|
||||
### Relay remote commands
|
||||
|
||||
Commands on remote buffers can now be toggled: execution on remote WeeChat or
|
||||
locally, with a new default key: `Alt`+`Ctrl`+`l` (L).
|
||||
|
||||
You can add this key with this command:
|
||||
|
||||
```text
|
||||
/key missing
|
||||
```
|
||||
|
||||
## Version 4.3.1
|
||||
|
||||
### Detection of libgcrypt
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2014-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2014-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2007 Julien Louis <ptitlouis@sysif.net>
|
||||
# Copyright (C) 2009 Emmanuel Bouthenot <kolter@openics.org>
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2011-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2011-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Copyright (C) 2017 Adam Saponara <as@php.net>
|
||||
# Copyright (C) 2017-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2017-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2009 Julien Louis <ptitlouis@sysif.net>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2015-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2015-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
@@ -24,7 +24,7 @@ Build-Depends:
|
||||
libzstd-dev,
|
||||
zlib1g-dev,
|
||||
libcjson-dev
|
||||
Standards-Version: 4.7.0
|
||||
Standards-Version: 4.7.2
|
||||
Homepage: https://weechat.org/
|
||||
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
|
||||
Vcs-Browser: https://salsa.debian.org/kolter/weechat
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
weechat (4.6.1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release (Closes: #1102450, #1098090)
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Wed, 16 Apr 2025 20:31:07 +0000
|
||||
|
||||
weechat (4.5.1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
* Update copyright file (new year)
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Mon, 20 Jan 2025 14:39:42 +0000
|
||||
|
||||
weechat (4.4.3-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
|
||||
@@ -24,7 +24,7 @@ Build-Depends:
|
||||
libzstd-dev,
|
||||
zlib1g-dev,
|
||||
libcjson-dev
|
||||
Standards-Version: 4.7.0
|
||||
Standards-Version: 4.7.2
|
||||
Homepage: https://weechat.org/
|
||||
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
|
||||
Vcs-Browser: https://salsa.debian.org/kolter/weechat
|
||||
|
||||
@@ -4,7 +4,7 @@ Upstream-Contact: Sébastien Helleu <flashcode@flashtux.org>
|
||||
Source: https://weechat.org/
|
||||
|
||||
Files: *
|
||||
Copyright: 2003-2024, Sébastien Helleu <flashcode@flashtux.org>
|
||||
Copyright: 2003-2025, Sébastien Helleu <flashcode@flashtux.org>
|
||||
License: GPL-3+
|
||||
|
||||
Files: src/core/core-command.c
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2009 Emmanuel Bouthenot <kolter@openics.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
|
||||
@@ -99,7 +99,7 @@ $HOME/.local/share/weechat/weechat.log::
|
||||
WeeChat je napsán Sébastienem Helleu a přispěvovateli (kompletní seznam je v
|
||||
souboru AUTHORS.md).
|
||||
|
||||
Copyright (C) 2003-2024 {author}
|
||||
Copyright (C) 2003-2025 {author}
|
||||
|
||||
WeeChat is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -100,7 +100,7 @@ $HOME/.local/share/weechat/weechat.log::
|
||||
WeeChat wird programmiert von Sébastien Helleu und weiteren Beteiligten (eine vollständige Auflistung
|
||||
findet man in der AUTHORS.md Datei).
|
||||
|
||||
Copyright (C) 2003-2024 {author}
|
||||
Copyright (C) 2003-2025 {author}
|
||||
|
||||
WeeChat is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1764,11 +1764,12 @@ Sie können mit dem Befehl <<command_weechat_key,/key>> geändert und neue hinzu
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Taste | Beschreibung | Befehl
|
||||
| kbd:[Alt+m] | schaltet Mausfunktion ein/aus. | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | Umschalten der Rechtschreibprüfung. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | schaltet Filterfunktion an/aus. | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | schaltet, für den aktuellen Buffer, Filterfunktion an/aus. | `+/filter toggle @+`
|
||||
| Taste | Beschreibung | Befehl
|
||||
| kbd:[Alt+m] | schaltet Mausfunktion ein/aus. | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | Umschalten der Rechtschreibprüfung. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | schaltet Filterfunktion an/aus. | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | schaltet, für den aktuellen Buffer, Filterfunktion an/aus. | `+/filter toggle @+`
|
||||
| kbd:[Alt+Ctrl+l] (`L`) | Umschalten zwischen Remote- und lokalen Befehlen in einem Remote-Buffer (relay "api"). | `+/remote togglecmd+`
|
||||
|===
|
||||
|
||||
[[key_bindings_search_context]]
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<!--
|
||||
Custom styles for Asciidoctor
|
||||
Copyright (C) 2016-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
Copyright (C) 2016-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
-->
|
||||
<style>
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ $HOME/.local/share/weechat/weechat.log::
|
||||
WeeChat is written by Sébastien Helleu and contributors (complete list is in
|
||||
the AUTHORS.md file).
|
||||
|
||||
Copyright (C) 2003-2024 {author}
|
||||
Copyright (C) 2003-2025 {author}
|
||||
|
||||
WeeChat is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -577,7 +577,7 @@ Example in C:
|
||||
/*
|
||||
* weechat.c - core functions for WeeChat
|
||||
*
|
||||
* Copyright (C) 2024 Your Name <your@email.com>
|
||||
* Copyright (C) 2025 Your Name <your@email.com>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
@@ -10981,6 +10981,11 @@ _WeeChat ≥ 4.1.0._
|
||||
|
||||
URL transfer.
|
||||
|
||||
This function is similar to <<_hook_process,hook_process>> and
|
||||
<<_hook_process_hashtable,hook_process_hashtable>> with command "url:..."
|
||||
but it uses a thread instead of new process, making it more lightweight
|
||||
and thus recommended for this usage.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
@@ -14014,6 +14019,10 @@ Properties:
|
||||
| Name of sub plugin (commonly script name, which is displayed in
|
||||
`/help command` for a hook of type _command_).
|
||||
|
||||
| keep_spaces_right | 4.6.0 | _command_, _command_run_
|
||||
| "0" or "1"
|
||||
| Keep trailing spaces in command arguments when it is executed.
|
||||
|
||||
| stdin | 0.4.3 | _process_, _process_hashtable_
|
||||
| any string
|
||||
| Send data on standard input (_stdin_) of child process.
|
||||
@@ -15519,8 +15528,8 @@ void weechat_window_set_title (const char *title);
|
||||
|
||||
Arguments:
|
||||
|
||||
* _title_: new title for terminal (NULL to reset title); string is evaluated,
|
||||
so variables like `${info:version}` can be used
|
||||
* _title_: new title for terminal; string is evaluated, so variables like
|
||||
`${info:version}` can be used
|
||||
(see <<_string_eval_expression,string_eval_expression>>)
|
||||
|
||||
C example:
|
||||
@@ -17083,6 +17092,71 @@ def my_completion_cb(data: str, completion_item: str, buffer: str, completion: s
|
||||
return weechat.WEECHAT_RC_OK
|
||||
----
|
||||
|
||||
==== completion_set
|
||||
|
||||
_WeeChat ≥ 4.6.0._
|
||||
|
||||
Set a completion property.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
void weechat_completion_get_string (struct t_gui_completion *completion,
|
||||
const char *property,
|
||||
const char *value);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _completion_: completion pointer
|
||||
* _property_: property name (see table below)
|
||||
* _value_: new value for property
|
||||
|
||||
Properties:
|
||||
|
||||
[width="100%",cols="^2,^1,4,8",options="header"]
|
||||
|===
|
||||
| Name | Min WeeChat | Value | Description
|
||||
|
||||
| add_space | 4.6.0 | "0" or "1"
|
||||
| "0": do not add space after completion +
|
||||
"1": add space after completion (default).
|
||||
|===
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int
|
||||
my_completion_cb (const void *pointer, void *data, const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
/* do not add space after completion */
|
||||
weechat_completion_set (completion, "add_space", "0");
|
||||
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def completion_set(completion: str, property: str, value: str) -> int: ...
|
||||
|
||||
# example
|
||||
def my_completion_cb(data: str, completion_item: str, buffer: str, completion: str) -> int:
|
||||
# do not add space after completion
|
||||
weechat.completion_set(completion, "add_space", "0")
|
||||
# ...
|
||||
return weechat.WEECHAT_RC_OK
|
||||
----
|
||||
|
||||
==== completion_list_add
|
||||
|
||||
_WeeChat ≥ 2.9._
|
||||
|
||||
@@ -1184,7 +1184,7 @@ Body parameters:
|
||||
|
||||
* `buffer_id` (integer, optional): buffer unique identifier (not to be confused
|
||||
with the buffer number, which is different)
|
||||
* `buffer` (string, optional, default: `core.weechat`): buffer name
|
||||
* `buffer_name` (string, optional, default: `core.weechat`): buffer name
|
||||
* `command` (string, **required**): command or text to send to the buffer
|
||||
|
||||
Request example: say "hello!" on channel #weechat:
|
||||
@@ -1192,7 +1192,7 @@ Request example: say "hello!" on channel #weechat:
|
||||
[source,shell]
|
||||
----
|
||||
curl -L -u 'plain:secret_password' -X POST \
|
||||
-d '{"buffer": "irc.libera.#weechat", "command": "hello!"}' \
|
||||
-d '{"buffer_name": "irc.libera.#weechat", "command": "hello!"}' \
|
||||
'https://localhost:9000/api/input'
|
||||
----
|
||||
|
||||
@@ -1220,6 +1220,58 @@ Response:
|
||||
HTTP/1.1 204 No content
|
||||
----
|
||||
|
||||
[[resource_completion]]
|
||||
=== Completion
|
||||
|
||||
Complete user command or text in a buffer.
|
||||
|
||||
Endpoint:
|
||||
|
||||
----
|
||||
POST /api/completion
|
||||
----
|
||||
|
||||
Body parameters:
|
||||
|
||||
* `buffer_id` (integer, optional): buffer unique identifier (not to be confused
|
||||
with the buffer number, which is different)
|
||||
* `buffer_name` (string, optional, default: `core.weechat`): buffer name
|
||||
* `command` (string, **required**): command or text to complete
|
||||
* `position` (integer, optional, default: end of string): position in command
|
||||
(first position is 0)
|
||||
|
||||
Request example: complete command `/qu` on channel #weechat:
|
||||
|
||||
[source,shell]
|
||||
----
|
||||
curl -L -u 'plain:secret_password' -X POST \
|
||||
-d '{"buffer_name": "irc.libera.#weechat", "command": "/qu"}' \
|
||||
'https://localhost:9000/api/completion'
|
||||
----
|
||||
|
||||
Response:
|
||||
|
||||
[source,http]
|
||||
----
|
||||
HTTP/1.1 200 OK
|
||||
----
|
||||
|
||||
[source,json]
|
||||
----
|
||||
{
|
||||
"context": "command",
|
||||
"base_word": "qu",
|
||||
"position_replace": 1,
|
||||
"add_space": true,
|
||||
"list": [
|
||||
"query",
|
||||
"quiet",
|
||||
"quit",
|
||||
"quote"
|
||||
]
|
||||
}
|
||||
----
|
||||
|
||||
[[resource_ping]]
|
||||
=== Ping
|
||||
|
||||
|
||||
@@ -1753,11 +1753,12 @@ They can be changed and new ones can be added with the <<command_weechat_key,/ke
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Description | Command
|
||||
| kbd:[Alt+m] | Toggle mouse. | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | Toggle spell checker. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | Toggle filters. | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | Toggle filters in current buffer. | `+/filter toggle @+`
|
||||
| Key | Description | Command
|
||||
| kbd:[Alt+m] | Toggle mouse. | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | Toggle spell checker. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | Toggle filters. | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | Toggle filters in current buffer. | `+/filter toggle @+`
|
||||
| kbd:[Alt+Ctrl+l] (`L`) | Toggle between remote and local commands on a remote buffer (relay "api"). | `+/remote togglecmd+`
|
||||
|===
|
||||
|
||||
[[key_bindings_search_context]]
|
||||
|
||||
@@ -102,7 +102,7 @@ $HOME/.local/share/weechat/weechat.log::
|
||||
WeeChat est écrit par Sébastien Helleu et des contributeurs (la liste complète
|
||||
est dans le fichier AUTHORS.md).
|
||||
|
||||
Copyright (C) 2003-2024 {author}
|
||||
Copyright (C) 2003-2025 {author}
|
||||
|
||||
WeeChat est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier
|
||||
sous les termes de la GNU General Public License telle que publiée par la
|
||||
|
||||
@@ -578,7 +578,7 @@ Exemple en C :
|
||||
/*
|
||||
* weechat.c - core functions for WeeChat
|
||||
*
|
||||
* Copyright (C) 2024 Your Name <your@email.com>
|
||||
* Copyright (C) 2025 Your Name <your@email.com>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
@@ -11185,6 +11185,11 @@ _WeeChat ≥ 4.1.0._
|
||||
|
||||
Transfert d'URL.
|
||||
|
||||
Cette fonction est similaire à <<_hook_process,hook_process>> et
|
||||
<<_hook_process_hashtable,hook_process_hashtable>> avec la commande "url:..."
|
||||
mais elle utilise un thread au lieu d'un nouveau processus, la rendant plus
|
||||
légère et donc recommandée pour cet usage.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
@@ -14327,6 +14332,10 @@ Propriétés :
|
||||
| Nom de la sous-extension (couramment un nom de script, qui est affiché dans
|
||||
`/help commande` pour un hook de type _command_).
|
||||
|
||||
| keep_spaces_right | 4.6.0 | _command_, _command_run_
|
||||
| "0" ou "1"
|
||||
| Garder les espaces à la fin des paramètres de la commande quand elle est exécutée.
|
||||
|
||||
| stdin | 0.4.3 | _process_, _process_hashtable_ | toute chaîne
|
||||
| Envoyer les données sur l'entrée standard (_stdin_) du processus fils.
|
||||
|
||||
@@ -15860,9 +15869,9 @@ void weechat_window_set_title (const char *title);
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _title_ : nouveau titre pour le terminal (NULL pour réinitialiser le titre) ;
|
||||
la chaîne est évaluée, donc les variables comme `${info:version}` peuvent
|
||||
être utilisées (voir <<_string_eval_expression,string_eval_expression>>)
|
||||
* _title_ : nouveau titre pour le terminal ; la chaîne est évaluée, donc les variables
|
||||
comme `${info:version}` peuvent être utilisées
|
||||
(voir <<_string_eval_expression,string_eval_expression>>)
|
||||
|
||||
Exemple en C :
|
||||
|
||||
@@ -17447,6 +17456,71 @@ def my_completion_cb(data: str, completion_item: str, buffer: str, completion: s
|
||||
return weechat.WEECHAT_RC_OK
|
||||
----
|
||||
|
||||
==== completion_set
|
||||
|
||||
_WeeChat ≥ 4.6.0._
|
||||
|
||||
Affecter une valeur à une propriété d'une complétion.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
void weechat_completion_get_string (struct t_gui_completion *completion,
|
||||
const char *property,
|
||||
const char *value);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _completion_ : pointeur vers la complétion
|
||||
* _property_ : nom de la propriété (voir le tableau ci-dessous)
|
||||
* _value_ : nouvelle valeur pour la propriété
|
||||
|
||||
Properties:
|
||||
|
||||
[width="100%",cols="^2,^1,4,8",options="header"]
|
||||
|===
|
||||
| Name | Min WeeChat | Value | Description
|
||||
|
||||
| add_space | 4.6.0 | "0" or "1"
|
||||
| "0": do not add space after completion +
|
||||
"1": add space after completion (default).
|
||||
|===
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int
|
||||
my_completion_cb (const void *pointer, void *data, const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
/* ne pas ajouter d'espace après la complétion */
|
||||
weechat_completion_set (completion, "add_space", "0");
|
||||
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def completion_set(completion: str, property: str, value: str) -> int: ...
|
||||
|
||||
# exemple
|
||||
def my_completion_cb(data: str, completion_item: str, buffer: str, completion: str) -> int:
|
||||
# ne pas ajouter d'espace après la complétion
|
||||
weechat.completion_set(completion, "add_space", "0")
|
||||
# ...
|
||||
return weechat.WEECHAT_RC_OK
|
||||
----
|
||||
|
||||
==== completion_list_add
|
||||
|
||||
_WeeChat ≥ 2.9._
|
||||
|
||||
@@ -1196,7 +1196,7 @@ Paramètres du corps :
|
||||
|
||||
* `buffer_id` (entier, facultatif) : identifiant unique du tampon (à ne pas
|
||||
confondre avec le numéro du tampon, qui est différent)
|
||||
* `buffer_name` (chaîne, facultatif) : nom de tampon
|
||||
* `buffer_name` (chaîne, facultatif, par défaut : `core.weechat`) : nom de tampon
|
||||
* `command` (chaîne, **obligatoire**) : commande ou texte à envoyer au tampon
|
||||
|
||||
Exemple de requête : dire "hello!" sur le canal #weechat :
|
||||
@@ -1204,7 +1204,7 @@ Exemple de requête : dire "hello!" sur le canal #weechat :
|
||||
[source,shell]
|
||||
----
|
||||
curl -L -u 'plain:secret_password' -X POST \
|
||||
-d '{"buffer": "irc.libera.#weechat", "command": "hello!"}' \
|
||||
-d '{"buffer_name": "irc.libera.#weechat", "command": "hello!"}' \
|
||||
'https://localhost:9000/api/input'
|
||||
----
|
||||
|
||||
@@ -1232,6 +1232,58 @@ Réponse :
|
||||
HTTP/1.1 204 No content
|
||||
----
|
||||
|
||||
[[resource_completion]]
|
||||
=== Complétion
|
||||
|
||||
Compléter une commande ou du texte de l'utilisateur sur un tampon.
|
||||
|
||||
Point de terminaison :
|
||||
|
||||
----
|
||||
POST /api/completion
|
||||
----
|
||||
|
||||
Paramètres du corps :
|
||||
|
||||
* `buffer_id` (entier, facultatif) : identifiant unique du tampon (à ne pas
|
||||
confondre avec le numéro du tampon, qui est différent)
|
||||
* `buffer_name` (chaîne, facultatif, par défaut : `core.weechat`) : nom de tampon
|
||||
* `command` (chaîne, **obligatoire**) : commande ou texte à compléter
|
||||
* `position` (entier, facultatif, par défaut : fin de la chaîne) : position
|
||||
dans la commande (la première position est 0)
|
||||
|
||||
Exemple de requête : compléter la commande `/qu` sur le canal #weechat :
|
||||
|
||||
[source,shell]
|
||||
----
|
||||
curl -L -u 'plain:secret_password' -X POST \
|
||||
-d '{"buffer_name": "irc.libera.#weechat", "command": "/qu"}' \
|
||||
'https://localhost:9000/api/completion'
|
||||
----
|
||||
|
||||
Réponse :
|
||||
|
||||
[source,http]
|
||||
----
|
||||
HTTP/1.1 200 OK
|
||||
----
|
||||
|
||||
[source,json]
|
||||
----
|
||||
{
|
||||
"context": "command",
|
||||
"base_word": "qu",
|
||||
"position_replace": 1,
|
||||
"add_space": true,
|
||||
"list": [
|
||||
"query",
|
||||
"quiet",
|
||||
"quit",
|
||||
"quote"
|
||||
]
|
||||
}
|
||||
----
|
||||
|
||||
[[resource_ping]]
|
||||
=== Ping
|
||||
|
||||
|
||||
@@ -1788,11 +1788,12 @@ Ils peuvent être modifiés et de nouveaux peuvent être ajoutés avec la comman
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Touche | Description | Commande
|
||||
| kbd:[Alt+m] | Activer/désactiver la souris. | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | Activer/désactiver la vérification de l'orthographe. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | Activer/désactiver les filtres. | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | Activer/désactiver les filtres dans le tampon courant. | `+/filter toggle @+`
|
||||
| Touche | Description | Commande
|
||||
| kbd:[Alt+m] | Activer/désactiver la souris. | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | Activer/désactiver la vérification de l'orthographe. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | Activer/désactiver les filtres. | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | Activer/désactiver les filtres dans le tampon courant. | `+/filter toggle @+`
|
||||
| kbd:[Alt+Ctrl+l] (`L`) | Basculer entre les commandes distantes et locales sur un tampon distant (relay "api"). | `+/remote togglecmd+`
|
||||
|===
|
||||
|
||||
[[key_bindings_search_context]]
|
||||
|
||||
@@ -103,7 +103,7 @@ $HOME/.local/share/weechat/weechat.log::
|
||||
WeeChat is written by Sébastien Helleu and contributors (complete list is in
|
||||
the AUTHORS.md file).
|
||||
|
||||
Copyright (C) 2003-2024 {author}
|
||||
Copyright (C) 2003-2025 {author}
|
||||
|
||||
WeeChat is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -11394,6 +11394,11 @@ _WeeChat ≥ 4.1.0._
|
||||
|
||||
URL transfer.
|
||||
|
||||
This function is similar to <<_hook_process,hook_process>> and
|
||||
<<_hook_process_hashtable,hook_process_hashtable>> with command "url:..."
|
||||
but it uses a thread instead of new process, making it more lightweight
|
||||
and thus recommended for this usage.
|
||||
|
||||
Prototipo:
|
||||
|
||||
[source,c]
|
||||
@@ -14667,11 +14672,17 @@ Properties:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| subplugin | | any type
|
||||
|
||||
| qualsiasi stringa |
|
||||
// TRANSLATION MISSING
|
||||
Name of sub plugin (commonly script name, which is displayed in
|
||||
`/help command` for a hook of type _command_).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| keep_spaces_right | 4.6.0 | _command_, _command_run_
|
||||
| "0" or "1"
|
||||
| Keep trailing spaces in command arguments when it is executed.
|
||||
|
||||
| stdin | 0.4.3 | _process_, _process_hashtable_ | qualsiasi stringa |
|
||||
// TRANSLATION MISSING
|
||||
Send data on standard input (_stdin_) of child process.
|
||||
@@ -16291,8 +16302,8 @@ void weechat_window_set_title (const char *title);
|
||||
Argomenti:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
* _title_: nuovo titolo per il terminale (NULL per resettarlo);
|
||||
string is evaluated, so variables like `${info:version}` can be used
|
||||
* _title_: nuovo titolo per il terminale; string is evaluated, so variables
|
||||
like `${info:version}` can be used
|
||||
(see <<_string_eval_expression,string_eval_expression>>)
|
||||
|
||||
Esempio in C:
|
||||
@@ -17918,6 +17929,77 @@ def my_completion_cb(data: str, completion_item: str, buffer: str, completion: s
|
||||
return weechat.WEECHAT_RC_OK
|
||||
----
|
||||
|
||||
==== completion_set
|
||||
|
||||
_Novità nella versioe 4.6.0._
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Set a completion property.
|
||||
|
||||
Prototipo:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
void weechat_completion_get_string (struct t_gui_completion *completion,
|
||||
const char *property,
|
||||
const char *value);
|
||||
----
|
||||
|
||||
Argomenti:
|
||||
|
||||
* _completion_: puntatore al completamento
|
||||
// TRANSLATION MISSING
|
||||
* _property_: nome della proprietà (see table below)
|
||||
// TRANSLATION MISSING
|
||||
* _value_: new value for property
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Properties:
|
||||
|
||||
[width="100%",cols="^2,^1,4,8",options="header"]
|
||||
|===
|
||||
// TRANSLATION MISSING
|
||||
| Name | Min WeeChat | Value | Description
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| add_space | 4.6.0 | "0" or "1"
|
||||
| "0": do not add space after completion +
|
||||
"1": add space after completion (default).
|
||||
|===
|
||||
|
||||
Esempio in C:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int
|
||||
my_completion_cb (const void *pointer, void *data, const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
/* do not add space after completion */
|
||||
weechat_completion_set (completion, "add_space", "0");
|
||||
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototipo
|
||||
def completion_set(completion: str, property: str, value: str) -> int: ...
|
||||
|
||||
# esempio
|
||||
def my_completion_cb(data: str, completion_item: str, buffer: str, completion: str) -> int:
|
||||
# do not add space after completion
|
||||
weechat.completion_set(completion, "add_space", "0")
|
||||
# ...
|
||||
return weechat.WEECHAT_RC_OK
|
||||
----
|
||||
|
||||
==== completion_list_add
|
||||
|
||||
_Novità nella versioe 2.9._
|
||||
|
||||
@@ -1934,13 +1934,15 @@ They can be changed and new ones can be added with the <<command_weechat_key,/ke
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Tasti | Descrizione | Comando
|
||||
| kbd:[Alt+m] | Abilita/disabilita. | `+/mouse toggle+`
|
||||
| Tasti | Descrizione | Comando
|
||||
| kbd:[Alt+m] | Abilita/disabilita. | `+/mouse toggle+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+s] | Toggle spell checker. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | Attiva/disattiva filtri. | `+/filter toggle+`
|
||||
| kbd:[Alt+s] | Toggle spell checker. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | Attiva/disattiva filtri. | `+/filter toggle+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+-] | Toggle filters in current buffer. | `+/filter toggle @+`
|
||||
| kbd:[Alt+-] | Toggle filters in current buffer. | `+/filter toggle @+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+Ctrl+l] (`L`) | Toggle between remote and local commands on a remote buffer (relay "api"). | `+/remote togglecmd+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
|
||||
@@ -100,7 +100,7 @@ $HOME/.local/share/weechat/weechat.log::
|
||||
WeeChat は Sébastien Helleu さんと貢献者によって作成されています
|
||||
(完全なリストは AUTHORS.md ファイルを参照してください)。
|
||||
|
||||
著作権 (C) 2003-2024 {author}
|
||||
著作権 (C) 2003-2025 {author}
|
||||
|
||||
WeeChat はフリーソフトウェアです。あなたはこれを、フリーソフトウェア財団によって発行された
|
||||
GNU 一般公衆利用許諾契約書 (バージョン 2 か、希望によってはそれ以降のバージョンのうちどれか)
|
||||
|
||||
@@ -701,7 +701,7 @@ WeeChat とプラグインの翻訳は gettext で行います、ファイルは
|
||||
/*
|
||||
* weechat.c - core functions for WeeChat
|
||||
*
|
||||
* Copyright (C) 2024 Your Name <your@email.com>
|
||||
* Copyright (C) 2025 Your Name <your@email.com>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
@@ -11127,6 +11127,11 @@ _WeeChat ≥ 4.1.0._
|
||||
|
||||
URL transfer.
|
||||
|
||||
This function is similar to <<_hook_process,hook_process>> and
|
||||
<<_hook_process_hashtable,hook_process_hashtable>> with command "url:..."
|
||||
but it uses a thread instead of new process, making it more lightweight
|
||||
and thus recommended for this usage.
|
||||
|
||||
プロトタイプ:
|
||||
|
||||
[source,c]
|
||||
@@ -14238,6 +14243,11 @@ void weechat_hook_set (struct t_hook *hook, const char *property,
|
||||
| サブプラグインの名前 (通常は `/help command` で _command_
|
||||
をタイプした時のフックで表示されるスクリプト名)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| keep_spaces_right | 4.6.0 | _command_, _command_run_
|
||||
| "0" or "1"
|
||||
| Keep trailing spaces in command arguments when it is executed.
|
||||
|
||||
| stdin | 0.4.3 | _process_、_process_hashtable_ | 任意の文字列
|
||||
| 子プロセスの標準入力 (_stdin_) にデータを送信
|
||||
|
||||
@@ -15787,8 +15797,8 @@ void weechat_window_set_title (const char *title);
|
||||
|
||||
引数:
|
||||
|
||||
* _title_: 端末の新しいタイトル (タイトルをリセットする場合は NULL);
|
||||
この文字列は評価されるため、文字列内に `${info:version}` などの変数を含めることが可能です
|
||||
* _title_: 端末の新しいタイトル; この文字列は評価されるため、文字列内に
|
||||
`${info:version}` などの変数を含めることが可能です
|
||||
(<<_string_eval_expression,string_eval_expression>> を参照)
|
||||
|
||||
C 言語での使用例:
|
||||
@@ -17377,6 +17387,74 @@ def my_completion_cb(data: str, completion_item: str, buffer: str, completion: s
|
||||
return weechat.WEECHAT_RC_OK
|
||||
----
|
||||
|
||||
==== completion_set
|
||||
|
||||
_WeeChat バージョン 4.6.0 以上で利用可。_
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Set a completion property.
|
||||
|
||||
プロトタイプ:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
void weechat_completion_get_string (struct t_gui_completion *completion,
|
||||
const char *property,
|
||||
const char *value);
|
||||
----
|
||||
|
||||
引数:
|
||||
|
||||
* _completion_: 補完へのポインタ
|
||||
* _property_: プロパティ名 (以下の表を参照)
|
||||
* _value_: プロパティの新しい値
|
||||
|
||||
プロパティ:
|
||||
|
||||
[width="100%",cols="^2,^1,4,8",options="header"]
|
||||
|===
|
||||
// TRANSLATION MISSING
|
||||
| Name | Min WeeChat | Value | Description
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| add_space | 4.6.0 | "0" or "1"
|
||||
| "0": do not add space after completion +
|
||||
"1": add space after completion (default).
|
||||
|===
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int
|
||||
my_completion_cb (const void *pointer, void *data, const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
/* do not add space after completion */
|
||||
weechat_completion_set (completion, "add_space", "0");
|
||||
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
----
|
||||
|
||||
スクリプト (Python) での使用例:
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def completion_set(completion: str, property: str, value: str) -> int: ...
|
||||
|
||||
# example
|
||||
def my_completion_cb(data: str, completion_item: str, buffer: str, completion: str) -> int:
|
||||
# do not add space after completion
|
||||
weechat.completion_set(completion, "add_space", "0")
|
||||
# ...
|
||||
return weechat.WEECHAT_RC_OK
|
||||
----
|
||||
|
||||
==== completion_list_add
|
||||
|
||||
_WeeChat バージョン 2.9 以上で利用可。_
|
||||
|
||||
@@ -1894,11 +1894,13 @@ They can be changed and new ones can be added with the <<command_weechat_key,/ke
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| キー | 説明 | コマンド
|
||||
| kbd:[Alt+m] | マウスの有効無効を切り替え | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | スペルチェッカの有効無効を切り替え | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | フィルタの有効無効を切り替え | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | 現在のバッファのフィルタの有効無効を切り替え | `+/filter toggle @+`
|
||||
| キー | 説明 | コマンド
|
||||
| kbd:[Alt+m] | マウスの有効無効を切り替え | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | スペルチェッカの有効無効を切り替え | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | フィルタの有効無効を切り替え | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | 現在のバッファのフィルタの有効無効を切り替え | `+/filter toggle @+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+Ctrl+l] (`L`) | Toggle between remote and local commands on a remote buffer (relay "api"). | `+/remote togglecmd+`
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
|
||||
@@ -33,9 +33,8 @@
|
||||
*-h*, *--help*::
|
||||
Wyświetla pomoc.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
*-i*, *--build-info*::
|
||||
Display build information and exit.
|
||||
Wyświetla informację o kompilacji.
|
||||
|
||||
*-l*, *--license*::
|
||||
Wyświetla licencję.
|
||||
|
||||
@@ -101,7 +101,7 @@ $HOME/.local/share/weechat/weechat.log::
|
||||
WeeChat jest tworzony przez Sébastien Helleu i społeczność (pełna lista dostępna
|
||||
jest w pliku AUTHORS.md).
|
||||
|
||||
Copyright (C) 2003-2024 {author}
|
||||
Copyright (C) 2003-2025 {author}
|
||||
|
||||
WeeChat is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
+10
-13
@@ -930,13 +930,11 @@ Pasek _status_ posiada następujące domyślne elementy:
|
||||
| buffer_nicklist_count | `4` | Ilość nicków wyświetlanych na liście nicków.
|
||||
| buffer_zoom | ! | `!` oznacza, że połączony bufor jest przybliżony (tylko ten jest wyświetlany), pusta wartość oznacza, że wszystkie połączone bufory są wyświetlane.
|
||||
| buffer_filter | `+*+` | Wskaźnik filtrowania: `+*+` oznacza, że niektóre linie zostały odfiltrowywane (ukryte), pusta wartość oznacza, że wszystkie linie są wyświetlane.
|
||||
// TRANSLATION MISSING
|
||||
| mouse_status | `M` | Mouse status (empty if mouse is disabled), see command <<command_weechat_mouse,/mouse>> and <<key_bindings_toggle_keys,Włącz/wyłącz>>.
|
||||
| mouse_status | `M` | Status obsługi myszy (pusty jeśli obsługa myszy jest wyłączona), zobacz <<command_weechat_mouse,/mouse>> i <<key_bindings_toggle_keys,Włącz/wyłącz>>.
|
||||
| scroll | `-Więcej(50)-` | Wskaźnik przewijania, z numerem linii poniżej ostatniej wyświetlanej.
|
||||
| lag | `Lag: 2.5` | Wskaźnik opóźnienia, w sekundach (ukryty dla niskich opóźnień).
|
||||
| hotlist | `H: 3:#abc(2,5), 5` | Lista buforów z aktywnością (nieprzeczytane wiadomości) (w przykładzie, 2 podświetlenia i 5 nieprzeczytanych wiadomości w _#abc_, jedna wiadomość w buforze #5).
|
||||
// TRANSLATION MISSING
|
||||
| typing | `Typing: bob, (alice)` | Typing notification, see <<typing_notifications,Powiadomienia o pisaniu>>.
|
||||
| typing | `Typing: bob, (alice)` | Powiadomienia o pisaniu, zobacz <<typing_notifications,Powiadomienia o pisaniu>>.
|
||||
| completion | `abc(2) def(5)` | Lista słów do dopełnienia, z ilością możliwych dopełnień dla każdego słowa.
|
||||
|===
|
||||
|
||||
@@ -999,8 +997,7 @@ Inne dostępne elementy (nie używane domyślnie w paskach):
|
||||
| irc_nick_host | `+Flashy!user@host.com+` | Aktualny nick i host IRC.
|
||||
| irc_nick_modes | `i` | Atrybuty IRC dla własnego nicka.
|
||||
| irc_nick_prefix | `@` | Prefiks nicku na kanale IRC.
|
||||
// TRANSLATION MISSING
|
||||
| spacer | | Special item used to align text in bars, see <<item_spacer,Odstęp>>.
|
||||
| spacer | | Specjalny element używany do wyrównania tekstu na paskach, zobacz <<item_spacer,Odstęp>>.
|
||||
| spell_dict | `fr,en` | Słowniki używane w obecnym buforze.
|
||||
| spell_suggest | `print,prone,prune` | Sugestie dla słowa pod kursorem (jeśli zawiera błąd).
|
||||
| tls_version | `TLS1.3` | Wersja TLS używana przez obecny serwer IRC.
|
||||
@@ -1764,11 +1761,12 @@ Można je zmienić oraz dodać nowe za pomocą komendy <<command_weechat_key,/ke
|
||||
|
||||
[width="100%",cols="^.^3,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Skrót | Opis | Komenda
|
||||
| kbd:[Alt+m] | Włącz/wyłącz obsługę myszy. | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | Włącz/wyłącz sprawdzenie pisowni. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | Włącz/wyłącz filtry. | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | Włącz/wyłącz filtry w bieżącym buforze. | `+/filter toggle @+`
|
||||
| Skrót | Opis | Komenda
|
||||
| kbd:[Alt+m] | Włącz/wyłącz obsługę myszy. | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | Włącz/wyłącz sprawdzenie pisowni. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | Włącz/wyłącz filtry. | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | Włącz/wyłącz filtry w bieżącym buforze. | `+/filter toggle @+`
|
||||
| kbd:[Alt+Ctrl+l] (`L`) | Przełącz między lokalnymi komendami a zdalnym buforem (relay "api"). | `+/remote togglecmd+`
|
||||
|===
|
||||
|
||||
[[key_bindings_search_context]]
|
||||
@@ -3434,8 +3432,7 @@ Na przykład w celu połączenia się do https://libera.chat/[libera.chat ^↗^
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
// TRANSLATION MISSING
|
||||
Default port is 6697 and TLS (encrypted traffic) is enabled.
|
||||
Domyślny port to 6697 i TLS (szyfrowanie ruchu) jest włączone.
|
||||
|
||||
Możesz powiedzieć WeeChat, aby automatycznie łączył się z tym serwerem po
|
||||
uruchomieniu:
|
||||
|
||||
@@ -99,7 +99,7 @@ $HOME/.local/share/weechat/weechat.log::
|
||||
WeeChat написан Sébastien Helleu и другими участниками (полный список находится
|
||||
в файле AUTHORS.md).
|
||||
|
||||
Copyright (C) 2003-2024 {author}
|
||||
Copyright (C) 2003-2025 {author}
|
||||
|
||||
WeeChat is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -20,9 +20,8 @@
|
||||
*-h*, *--help*::
|
||||
Приказује помоћ.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
*-i*, *--build-info*::
|
||||
Display build information and exit.
|
||||
Приказује информације о изградњи и прекида извршавање.
|
||||
|
||||
*-l*, *--license*::
|
||||
Приказује лиценцу програма WeeChat.
|
||||
|
||||
@@ -97,7 +97,7 @@ $HOME/.config/weechat/weechat.log::
|
||||
// tag::copyright[]
|
||||
Програм WeeChat је написао Себастијен Елеу и људи који су дали свој допринос (комплетна листа се налази у фајлу AUTHORS.md).
|
||||
|
||||
Ауторска права (C) 2003-2024 {author}
|
||||
Ауторска права (C) 2003-2025 {author}
|
||||
|
||||
WeeChat је слободни софтвер; можете га редистрибуирати и/или изменити под условима ГНУ Опште Јавне Лиценце коју је објавила Free Software Foundation; или верзије 3 Лиценце, или (по вашој жељи) било којој каснијој верзији.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ include::includes/attributes-sr.adoc[]
|
||||
|
||||
Превод:
|
||||
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2021.
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2025.
|
||||
|
||||
Ово упутство описује WeeChat чет клијент и део је програма WeeChat.
|
||||
|
||||
@@ -576,7 +576,7 @@ WeeChat „језгро” се налази у следећим директо
|
||||
/*
|
||||
* weechat.c - core functions for WeeChat
|
||||
*
|
||||
* Copyright (C) 2024 Your Name <your@email.com>
|
||||
* Copyright (C) 2025 Your Name <your@email.com>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
@@ -6,7 +6,7 @@ include::includes/attributes-sr.adoc[]
|
||||
|
||||
Превод:
|
||||
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2021.
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2025.
|
||||
|
||||
[[general]]
|
||||
== Опште
|
||||
|
||||
@@ -6,7 +6,7 @@ include::includes/attributes-sr.adoc[]
|
||||
|
||||
Превод:
|
||||
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2021.
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2025.
|
||||
|
||||
Ово упутство описује WeeChat чет клијент и део је програма WeeChat.
|
||||
|
||||
@@ -10702,6 +10702,12 @@ _WeeChat ≥ 4.1.0._
|
||||
|
||||
URL трансфер.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
This function is similar to <<_hook_process,hook_process>> and
|
||||
<<_hook_process_hashtable,hook_process_hashtable>> with command "url:..."
|
||||
but it uses a thread instead of new process, making it more lightweight
|
||||
and thus recommended for this usage.
|
||||
|
||||
Прототип:
|
||||
|
||||
[source,c]
|
||||
@@ -13621,6 +13627,11 @@ void weechat_hook_set (struct t_hook *hook, const char *property,
|
||||
| Име под додатка (обично је то име скрипте које се приказује у
|
||||
`/help команда` за куку типа _command_).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| keep_spaces_right | 4.6.0 | _command_, _command_run_
|
||||
| "0" or "1"
|
||||
| Keep trailing spaces in command arguments when it is executed.
|
||||
|
||||
| stdin | 0.4.3 | _process_, _process_hashtable_ | било који стринг
|
||||
| Шаље податке на стандардни улаз (_stdin_) дете процеса.
|
||||
|
||||
@@ -15093,7 +15104,9 @@ void weechat_window_set_title (const char *title);
|
||||
|
||||
Аргументи:
|
||||
|
||||
* _title_: нови наслов за терминал (NULL ако желите да ресетујете наслов); стринг се израчунава, тако да је могуће коришћење променљивих као што је `${info:version}` (погледајте <<_string_eval_expression,string_eval_expression>>)
|
||||
* _title_: нови наслов за терминал; стринг се израчунава, тако да је могуће
|
||||
коришћење променљивих као што је `${info:version}`
|
||||
(погледајте <<_string_eval_expression,string_eval_expression>>)
|
||||
|
||||
C пример:
|
||||
|
||||
@@ -16624,6 +16637,73 @@ def my_completion_cb(data: str, completion_item: str, buffer: str, completion: s
|
||||
return weechat.WEECHAT_RC_OK
|
||||
----
|
||||
|
||||
==== completion_set
|
||||
|
||||
_WeeChat ≥ 4.6.0._
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Set a completion property.
|
||||
|
||||
Прототип:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
void weechat_completion_get_string (struct t_gui_completion *completion,
|
||||
const char *property,
|
||||
const char *value);
|
||||
----
|
||||
|
||||
Аргументи:
|
||||
|
||||
* _completion_: показивач на довршавање
|
||||
* _property_: име особине (погледајте табелу испод)
|
||||
* _value_: нова вредност за особину
|
||||
|
||||
Особине:
|
||||
|
||||
[width="100%",cols="^2,^1,4,8",options="header"]
|
||||
|===
|
||||
| Име | Мин WeeChat | Вредност | Опис
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| add_space | 4.6.0 | "0" or "1"
|
||||
| "0": do not add space after completion +
|
||||
"1": add space after completion (default).
|
||||
|===
|
||||
|
||||
C пример:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int
|
||||
my_completion_cb (const void *pointer, void *data, const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
/* do not add space after completion */
|
||||
weechat_completion_set (completion, "add_space", "0");
|
||||
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
----
|
||||
|
||||
Скрипта (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# прототип
|
||||
def completion_set(completion: str, property: str, value: str) -> int: ...
|
||||
|
||||
# пример
|
||||
def my_completion_cb(data: str, completion_item: str, buffer: str, completion: str) -> int:
|
||||
# do not add space after completion
|
||||
weechat.completion_set(completion, "add_space", "0")
|
||||
# ...
|
||||
return weechat.WEECHAT_RC_OK
|
||||
----
|
||||
|
||||
==== completion_list_add
|
||||
|
||||
_WeeChat ≥ 2.9._
|
||||
|
||||
@@ -6,7 +6,7 @@ include::includes/attributes-sr.adoc[]
|
||||
|
||||
Превод:
|
||||
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2021.
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2025.
|
||||
|
||||
[[start]]
|
||||
== Покретање програма WeeChat
|
||||
|
||||
@@ -6,7 +6,7 @@ include::includes/attributes-sr.adoc[]
|
||||
|
||||
Превод:
|
||||
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2021.
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2025.
|
||||
|
||||
[[introduction]]
|
||||
== Увод
|
||||
|
||||
@@ -6,7 +6,7 @@ include::includes/attributes-sr.adoc[]
|
||||
|
||||
Превод:
|
||||
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2021.
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2025.
|
||||
|
||||
Ово упутство описује WeeChat чет клијент и део је програма WeeChat.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ include::includes/attributes-sr.adoc[]
|
||||
|
||||
Превод:
|
||||
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2021.
|
||||
* Иван Пешић (<ivan.pesic@gmail.com>), 2025.
|
||||
|
||||
Ово упутство описује WeeChat чет клијент и део је програма WeeChat.
|
||||
|
||||
@@ -1671,11 +1671,13 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
|
||||
[width="100%", cols="^.^3,.^8,.^5", options="header"]
|
||||
|===
|
||||
| Тастер | Опис | Команда
|
||||
| kbd:[Alt+m] | Пребацивање активности миша. | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | Пребацује стање активности модула за проверу правописа. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | Пребацивање активности филтера. | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | Пребацивање активности филтера у текућем баферу. | `+/filter toggle @+`
|
||||
| Тастер | Опис | Команда
|
||||
| kbd:[Alt+m] | Пребацивање активности миша. | `+/mouse toggle+`
|
||||
| kbd:[Alt+s] | Пребацује стање активности модула за проверу правописа. | `+/mute spell toggle+`
|
||||
| kbd:[Alt+=] | Пребацивање активности филтера. | `+/filter toggle+`
|
||||
| kbd:[Alt+-] | Пребацивање активности филтера у текућем баферу. | `+/filter toggle @+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[Alt+Ctrl+l] (`L`) | Toggle between remote and local commands on a remote buffer (relay "api"). | `+/remote togglecmd+`
|
||||
|===
|
||||
|
||||
[[key_bindings_search_context]]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
|
||||
+387
-203
File diff suppressed because it is too large
Load Diff
+352
-191
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2007-2008 Julien Louis <ptitlouis@sysif.net>
|
||||
# Copyright (C) 2008-2009 Emmanuel Bouthenot <kolter@openics.org>
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
# Copyright (C) 2008 Julien Louis <ptitlouis@sysif.net>
|
||||
# Copyright (C) 2009 Emmanuel Bouthenot <kolter@openics.org>
|
||||
#
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-arraylist.c - array lists management
|
||||
*
|
||||
* Copyright (C) 2014-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2014-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2014-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2014-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-backtrace.c - backtrace after a segfault
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
@@ -149,7 +149,7 @@ weechat_backtrace_addr2line (int number, void *address, const char *symbol)
|
||||
*/
|
||||
|
||||
void
|
||||
weechat_backtrace ()
|
||||
weechat_backtrace (void)
|
||||
{
|
||||
#ifdef HAVE_BACKTRACE
|
||||
void *trace[BACKTRACE_MAX];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
@@ -22,6 +22,6 @@
|
||||
|
||||
#define BACKTRACE_MAX 128
|
||||
|
||||
extern void weechat_backtrace ();
|
||||
extern void weechat_backtrace (void);
|
||||
|
||||
#endif /* WEECHAT_BACKTRACE_H */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-calc.c - calculate result of an expression
|
||||
*
|
||||
* Copyright (C) 2019-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2019-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
@@ -336,9 +336,9 @@ calc_expression (const char *expr)
|
||||
struct t_arraylist *list_values, *list_ops;
|
||||
const char *ptr_expr, *ptr_expr2;
|
||||
char str_result[64], *ptr_operator, *operator;
|
||||
int index_op, decimals;
|
||||
int index_op;
|
||||
enum t_calc_symbol last_symbol;
|
||||
double value, factor, *ptr_value;
|
||||
double value, factor, decimals, *ptr_value;
|
||||
|
||||
list_values = NULL;
|
||||
list_ops = NULL;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2019-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
+454
-115
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-command.c - WeeChat core commands
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
@@ -1841,7 +1841,7 @@ COMMAND_CALLBACK(color)
|
||||
|
||||
COMMAND_CALLBACK(command)
|
||||
{
|
||||
int length, index_args, any_plugin;
|
||||
int index_args, any_plugin;
|
||||
char *command, **commands, **ptr_command;
|
||||
struct t_weechat_plugin *ptr_plugin;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
@@ -1912,11 +1912,8 @@ COMMAND_CALLBACK(command)
|
||||
}
|
||||
else
|
||||
{
|
||||
length = strlen (argv_eol[index_args + 1]) + 2;
|
||||
command = malloc (length);
|
||||
if (command)
|
||||
if (string_asprintf (&command, "/%s", argv_eol[index_args + 1]) >= 0)
|
||||
{
|
||||
snprintf (command, length, "/%s", argv_eol[index_args + 1]);
|
||||
(void) input_exec_command (ptr_buffer, any_plugin, ptr_plugin,
|
||||
command, NULL);
|
||||
free (command);
|
||||
@@ -2038,7 +2035,7 @@ COMMAND_CALLBACK(debug)
|
||||
struct t_weechat_plugin *ptr_plugin;
|
||||
struct timeval time_start, time_end;
|
||||
char *result, *str_threshold;
|
||||
long long threshold;
|
||||
unsigned long long threshold;
|
||||
int debug;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -2076,7 +2073,8 @@ COMMAND_CALLBACK(debug)
|
||||
if (string_strcmp (argv[1], "callbacks") == 0)
|
||||
{
|
||||
COMMAND_MIN_ARGS(3, argv[1]);
|
||||
threshold = util_parse_delay (argv[2], 1);
|
||||
if (!util_parse_delay (argv[2], 1, &threshold))
|
||||
COMMAND_ERROR;
|
||||
if (threshold > 0)
|
||||
{
|
||||
str_threshold = util_get_microseconds_string (threshold);
|
||||
@@ -2294,6 +2292,13 @@ COMMAND_CALLBACK(debug)
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
if (string_strcmp (argv[1], "whitespace") == 0)
|
||||
{
|
||||
gui_chat_whitespace_mode ^= 1;
|
||||
gui_window_ask_refresh (1);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
COMMAND_ERROR;
|
||||
}
|
||||
|
||||
@@ -3053,7 +3058,7 @@ command_help_list_commands (int verbose)
|
||||
*/
|
||||
|
||||
const char *
|
||||
command_help_option_color_values ()
|
||||
command_help_option_color_values (void)
|
||||
{
|
||||
return _("a WeeChat color name (default, black, "
|
||||
"(dark)gray, white, (light)red, (light)green, "
|
||||
@@ -3079,8 +3084,8 @@ COMMAND_CALLBACK(help)
|
||||
struct t_weechat_plugin *ptr_plugin;
|
||||
struct t_config_option *ptr_option;
|
||||
int i, length, command_found, first_line_displayed, verbose;
|
||||
char *string, *ptr_string, *pos_double_pipe, *pos_end, *args_desc;
|
||||
char empty_string[1] = { '\0' }, str_format[64];
|
||||
char *string, *ptr_string, **string_values, *pos_double_pipe, *pos_end;
|
||||
char *args_desc, empty_string[1] = { '\0' }, str_format[64];
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
@@ -3370,63 +3375,53 @@ COMMAND_CALLBACK(help)
|
||||
}
|
||||
break;
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
length = 0;
|
||||
i = 0;
|
||||
while (ptr_option->string_values[i])
|
||||
string_values = string_dyn_alloc (256);
|
||||
if (string_values)
|
||||
{
|
||||
length += strlen (ptr_option->string_values[i]) + 5;
|
||||
i++;
|
||||
}
|
||||
if (length > 0)
|
||||
{
|
||||
string = malloc (length);
|
||||
if (string)
|
||||
i = 0;
|
||||
while (ptr_option->string_values[i])
|
||||
{
|
||||
string[0] = '\0';
|
||||
i = 0;
|
||||
while (ptr_option->string_values[i])
|
||||
{
|
||||
strcat (string, "\"");
|
||||
strcat (string, ptr_option->string_values[i]);
|
||||
strcat (string, "\"");
|
||||
if (ptr_option->string_values[i + 1])
|
||||
strcat (string, ", ");
|
||||
i++;
|
||||
}
|
||||
gui_chat_printf (NULL, " %s: %s",
|
||||
_("type"), _("enum"));
|
||||
gui_chat_printf (NULL, " %s: %s",
|
||||
_("values"), string);
|
||||
if (ptr_option->default_value)
|
||||
{
|
||||
gui_chat_printf (NULL, " %s: \"%s\"",
|
||||
_("default value"),
|
||||
ptr_option->string_values[CONFIG_ENUM_DEFAULT(ptr_option)]);
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL, " %s: %s",
|
||||
_("default value"),
|
||||
_("(undefined)"));
|
||||
}
|
||||
if (ptr_option->value)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
" %s: \"%s%s%s\"",
|
||||
_("current value"),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_VALUE),
|
||||
ptr_option->string_values[CONFIG_ENUM(ptr_option)],
|
||||
GUI_COLOR(GUI_COLOR_CHAT));
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
" %s: %s",
|
||||
_("current value"),
|
||||
_("(undefined)"));
|
||||
}
|
||||
free (string);
|
||||
string_dyn_concat (string_values, "\"", -1);
|
||||
string_dyn_concat (string_values,
|
||||
ptr_option->string_values[i], -1);
|
||||
string_dyn_concat (string_values, "\"", -1);
|
||||
if (ptr_option->string_values[i + 1])
|
||||
string_dyn_concat (string_values, ", ", -1);
|
||||
i++;
|
||||
}
|
||||
gui_chat_printf (NULL, " %s: %s", _("type"), _("enum"));
|
||||
gui_chat_printf (NULL, " %s: %s", _("values"), *string_values);
|
||||
if (ptr_option->default_value)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL, " %s: \"%s\"",
|
||||
_("default value"),
|
||||
ptr_option->string_values[CONFIG_ENUM_DEFAULT(ptr_option)]);
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL, " %s: %s",
|
||||
_("default value"),
|
||||
_("(undefined)"));
|
||||
}
|
||||
if (ptr_option->value)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
" %s: \"%s%s%s\"",
|
||||
_("current value"),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_VALUE),
|
||||
ptr_option->string_values[CONFIG_ENUM(ptr_option)],
|
||||
GUI_COLOR(GUI_COLOR_CHAT));
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
" %s: %s",
|
||||
_("current value"),
|
||||
_("(undefined)"));
|
||||
}
|
||||
string_dyn_free (string_values, 1);
|
||||
}
|
||||
break;
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
@@ -4874,7 +4869,7 @@ COMMAND_CALLBACK(mouse)
|
||||
|
||||
COMMAND_CALLBACK(mute)
|
||||
{
|
||||
int length, mute_mode, gui_chat_mute_old;
|
||||
int mute_mode, gui_chat_mute_old;
|
||||
char *command, *ptr_command;
|
||||
struct t_gui_buffer *mute_buffer, *ptr_buffer, *gui_chat_mute_buffer_old;
|
||||
|
||||
@@ -4939,11 +4934,8 @@ COMMAND_CALLBACK(mute)
|
||||
}
|
||||
else
|
||||
{
|
||||
length = strlen (ptr_command) + 2;
|
||||
command = malloc (length);
|
||||
if (command)
|
||||
if (string_asprintf (&command, "/%s", ptr_command) >= 0)
|
||||
{
|
||||
snprintf (command, length, "/%s", ptr_command);
|
||||
(void) input_exec_command (buffer, 1, NULL, command, NULL);
|
||||
free (command);
|
||||
}
|
||||
@@ -4959,6 +4951,260 @@ COMMAND_CALLBACK(mute)
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Opens a file in write mode to redirect messages.
|
||||
*
|
||||
* Returns a pointer to the file, NULL if error.
|
||||
*/
|
||||
|
||||
FILE *
|
||||
command_pipe_open_file (const char *filename)
|
||||
{
|
||||
char *filename2;
|
||||
FILE *file;
|
||||
|
||||
filename2 = string_expand_home (filename);
|
||||
if (!filename2)
|
||||
return NULL;
|
||||
|
||||
file = fopen (filename2, "w");
|
||||
if (!file)
|
||||
return NULL;
|
||||
|
||||
fchmod (fileno (file), 0600);
|
||||
|
||||
free (filename2);
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for command "/pipe": redirect command output to a buffer or a file
|
||||
*/
|
||||
|
||||
COMMAND_CALLBACK(pipe)
|
||||
{
|
||||
const char *ptr_command, *ptr_filename, *ptr_hsignal;
|
||||
const char *ptr_concat_separator, *ptr_strip_chars;
|
||||
char *command, space[2] = " ", newline[2] = "\n";
|
||||
int i, index_command, skip_empty_lines, send_to_buffer, no_locale;
|
||||
int pipe_set, color, color_set;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
/* silently ignore missing arguments ("/pipe" does nothing) */
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
index_command = 1;
|
||||
send_to_buffer = 0;
|
||||
no_locale = 0;
|
||||
ptr_concat_separator = NULL;
|
||||
ptr_strip_chars = NULL;
|
||||
skip_empty_lines = 0;
|
||||
ptr_buffer = NULL;
|
||||
ptr_filename = NULL;
|
||||
ptr_hsignal = NULL;
|
||||
ptr_command = NULL;
|
||||
color = GUI_CHAT_PIPE_COLOR_STRIP;
|
||||
color_set = 0;
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (string_strcmp (argv[i], "-concat") == 0)
|
||||
{
|
||||
COMMAND_MIN_ARGS(i + 2, argv[i]);
|
||||
i++;
|
||||
ptr_concat_separator = argv[i];
|
||||
index_command = i + 1;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-strip") == 0)
|
||||
{
|
||||
COMMAND_MIN_ARGS(i + 2, argv[i]);
|
||||
i++;
|
||||
ptr_strip_chars = argv[i];
|
||||
index_command = i + 1;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-skipempty") == 0)
|
||||
{
|
||||
skip_empty_lines = 1;
|
||||
index_command = i + 1;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-c") == 0)
|
||||
{
|
||||
ptr_concat_separator = space;
|
||||
ptr_strip_chars = space;
|
||||
skip_empty_lines = 1;
|
||||
index_command = i + 1;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-nl") == 0)
|
||||
{
|
||||
no_locale = 1;
|
||||
index_command = i + 1;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-o") == 0)
|
||||
{
|
||||
send_to_buffer = 1;
|
||||
index_command = i + 1;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-buffer") == 0)
|
||||
{
|
||||
COMMAND_MIN_ARGS(i + 2, argv[i]);
|
||||
i++;
|
||||
ptr_buffer = gui_buffer_search_by_full_name (argv[i]);
|
||||
if (!ptr_buffer)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sBuffer \"%s\" not found"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
argv[i]);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
index_command = i + 1;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-file") == 0)
|
||||
{
|
||||
COMMAND_MIN_ARGS(i + 2, argv[i]);
|
||||
i++;
|
||||
ptr_filename = argv[i];
|
||||
index_command = i + 1;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-hsignal") == 0)
|
||||
{
|
||||
COMMAND_MIN_ARGS(i + 2, argv[i]);
|
||||
i++;
|
||||
ptr_hsignal = argv[i];
|
||||
index_command = i + 1;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-color") == 0)
|
||||
{
|
||||
COMMAND_MIN_ARGS(i + 2, argv[i]);
|
||||
i++;
|
||||
color = gui_chat_pipe_search_color (argv[i]);
|
||||
if (color < 0)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sInvalid color: \"%s\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
argv[i]);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
color_set = 1;
|
||||
index_command = i + 1;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
if (index_command < argc)
|
||||
ptr_command = argv_eol[index_command];
|
||||
|
||||
if (!ptr_command || !ptr_command[0])
|
||||
{
|
||||
/* silently ignore missing command */
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/* for hsignal, set default concat separator to newline if not set */
|
||||
if (ptr_hsignal && !ptr_concat_separator)
|
||||
ptr_concat_separator = newline;
|
||||
|
||||
/*
|
||||
* when chaining /pipe command, only the first one (surrounding) wins;
|
||||
* if buffer/file is already set, ignore it and just execute the command
|
||||
* with the existing redirection
|
||||
*/
|
||||
pipe_set = 0;
|
||||
if (!gui_chat_pipe)
|
||||
{
|
||||
gui_chat_pipe_command = strdup (ptr_command);
|
||||
if (ptr_filename)
|
||||
{
|
||||
gui_chat_pipe_file = command_pipe_open_file (ptr_filename);
|
||||
if (!gui_chat_pipe_file)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sUnable to open file \"%s\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
ptr_filename);
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
else if (ptr_hsignal)
|
||||
{
|
||||
gui_chat_pipe_hsignal = strdup (ptr_hsignal);
|
||||
if (!gui_chat_pipe_hsignal)
|
||||
COMMAND_ERROR;
|
||||
gui_chat_pipe_concat_tags = string_dyn_alloc (1024);
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_pipe_buffer = (ptr_buffer) ? ptr_buffer : buffer;
|
||||
if (!gui_chat_pipe_buffer)
|
||||
COMMAND_ERROR;
|
||||
if (!color_set && !send_to_buffer)
|
||||
color = GUI_CHAT_PIPE_COLOR_KEEP;
|
||||
if (gui_chat_pipe_buffer->type != GUI_BUFFER_TYPE_FORMATTED)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sCommand /pipe can only use buffers "
|
||||
"with formatted content"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
|
||||
gui_chat_pipe_buffer = NULL;
|
||||
return WEECHAT_RC_ERROR;
|
||||
}
|
||||
}
|
||||
gui_chat_pipe_send_to_buffer = send_to_buffer;
|
||||
if (ptr_concat_separator)
|
||||
{
|
||||
gui_chat_pipe_concat_lines = string_dyn_alloc (1024);
|
||||
gui_chat_pipe_concat_sep = string_convert_escaped_chars (
|
||||
ptr_concat_separator);
|
||||
}
|
||||
if (ptr_strip_chars)
|
||||
{
|
||||
gui_chat_pipe_strip_chars = string_convert_escaped_chars (
|
||||
ptr_strip_chars);
|
||||
}
|
||||
gui_chat_pipe_skip_empty_lines = skip_empty_lines;
|
||||
if (no_locale)
|
||||
setlocale (LC_ALL, "C");
|
||||
gui_chat_pipe_color = color;
|
||||
pipe_set = 1;
|
||||
gui_chat_pipe = 1;
|
||||
}
|
||||
|
||||
if (string_asprintf (
|
||||
&command,
|
||||
"%s%s",
|
||||
(string_is_command_char (ptr_command)) ? "" : "/",
|
||||
ptr_command) < 0)
|
||||
COMMAND_ERROR;
|
||||
|
||||
(void) input_exec_command (
|
||||
buffer,
|
||||
1, /* any_plugin */
|
||||
NULL, /* plugin */
|
||||
command,
|
||||
NULL); /* commands_allowed */
|
||||
|
||||
free (command);
|
||||
|
||||
if (pipe_set)
|
||||
{
|
||||
gui_chat_pipe_end ();
|
||||
if (no_locale)
|
||||
setlocale (LC_ALL, "");
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Displays a list of loaded plugins.
|
||||
*/
|
||||
@@ -5495,7 +5741,7 @@ COMMAND_CALLBACK(print)
|
||||
*/
|
||||
|
||||
void
|
||||
command_proxy_list ()
|
||||
command_proxy_list (void)
|
||||
{
|
||||
struct t_proxy *ptr_proxy;
|
||||
const char *ipv6_status;
|
||||
@@ -5929,7 +6175,7 @@ command_repeat_timer_cb (const void *pointer, void *data, int remaining_calls)
|
||||
COMMAND_CALLBACK(repeat)
|
||||
{
|
||||
int arg_count, count, i;
|
||||
long long interval;
|
||||
unsigned long long interval;
|
||||
char *error;
|
||||
struct t_command_repeat *cmd_repeat;
|
||||
|
||||
@@ -5944,9 +6190,8 @@ COMMAND_CALLBACK(repeat)
|
||||
|
||||
if ((argc >= 5) && (string_strcmp (argv[1], "-interval") == 0))
|
||||
{
|
||||
interval = util_parse_delay (argv[2], 1000000);
|
||||
if (interval < 0)
|
||||
interval = 0;
|
||||
if (!util_parse_delay (argv[2], 1000000, &interval))
|
||||
COMMAND_ERROR;
|
||||
interval /= 1000;
|
||||
arg_count = 3;
|
||||
}
|
||||
@@ -6491,7 +6736,7 @@ int
|
||||
command_set_display_option_list (const char *message, const char *search,
|
||||
int display_only_changed)
|
||||
{
|
||||
int number_found, section_displayed, length;
|
||||
int number_found, section_displayed;
|
||||
struct t_config_file *ptr_config;
|
||||
struct t_config_section *ptr_section;
|
||||
struct t_config_option *ptr_option;
|
||||
@@ -6524,15 +6769,12 @@ command_set_display_option_list (const char *message, const char *search,
|
||||
!config_file_option_has_changed (ptr_option))
|
||||
continue;
|
||||
|
||||
length = strlen (ptr_config->name) + 1
|
||||
+ strlen (ptr_section->name) + 1
|
||||
+ strlen (ptr_option->name) + 1;
|
||||
option_full_name = malloc (length);
|
||||
if (option_full_name)
|
||||
if (string_asprintf (&option_full_name,
|
||||
"%s.%s.%s",
|
||||
ptr_config->name,
|
||||
ptr_section->name,
|
||||
ptr_option->name) >= 0)
|
||||
{
|
||||
snprintf (option_full_name, length, "%s.%s.%s",
|
||||
ptr_config->name, ptr_section->name,
|
||||
ptr_option->name);
|
||||
if ((!search) ||
|
||||
(search && search[0]
|
||||
&& (string_match (option_full_name, search, 1))))
|
||||
@@ -7126,6 +7368,7 @@ COMMAND_CALLBACK(unset)
|
||||
|
||||
void
|
||||
command_upgrade_display (struct t_gui_buffer *buffer,
|
||||
int send_to_buffer_as_input,
|
||||
int translated_string)
|
||||
{
|
||||
char string[1024], str_first_start[128], str_last_start[128];
|
||||
@@ -7187,11 +7430,18 @@ command_upgrade_display (struct t_gui_buffer *buffer,
|
||||
}
|
||||
}
|
||||
|
||||
(void) input_data (buffer,
|
||||
string,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
if (send_to_buffer_as_input)
|
||||
{
|
||||
(void) input_data (buffer,
|
||||
string,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL, "%s", string);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7218,12 +7468,12 @@ COMMAND_CALLBACK(upgrade)
|
||||
{
|
||||
if (string_strcmp (argv[1], "-o") == 0)
|
||||
{
|
||||
command_upgrade_display (buffer, 0);
|
||||
command_upgrade_display (buffer, 1, 0);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
if (string_strcmp (argv[1], "-ol") == 0)
|
||||
{
|
||||
command_upgrade_display (buffer, 1);
|
||||
command_upgrade_display (buffer, 1, 1);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
if (string_strcmp (argv[1], "-yes") == 0)
|
||||
@@ -7534,7 +7784,8 @@ void
|
||||
command_version_display (struct t_gui_buffer *buffer,
|
||||
int send_to_buffer_as_input,
|
||||
int translated_string,
|
||||
int display_git_version)
|
||||
int display_git_version,
|
||||
int display_upgrades)
|
||||
{
|
||||
char string[1024];
|
||||
|
||||
@@ -7564,6 +7815,9 @@ command_version_display (struct t_gui_buffer *buffer,
|
||||
version_get_compilation_time (),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS));
|
||||
}
|
||||
|
||||
if (display_upgrades)
|
||||
command_upgrade_display (buffer, send_to_buffer_as_input, translated_string);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7572,7 +7826,7 @@ command_version_display (struct t_gui_buffer *buffer,
|
||||
|
||||
COMMAND_CALLBACK(version)
|
||||
{
|
||||
int send_to_buffer_as_input, translated_string;
|
||||
int i, send_to_buffer_as_input, translated_string, display_upgrades;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
@@ -7581,20 +7835,32 @@ COMMAND_CALLBACK(version)
|
||||
|
||||
send_to_buffer_as_input = 0;
|
||||
translated_string = 0;
|
||||
display_upgrades = 0;
|
||||
|
||||
if (argc >= 2)
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
if (string_strcmp (argv[1], "-o") == 0)
|
||||
if (string_strcmp (argv[i], "-o") == 0)
|
||||
{
|
||||
send_to_buffer_as_input = 1;
|
||||
else if (string_strcmp (argv[1], "-ol") == 0)
|
||||
translated_string = 0;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-ol") == 0)
|
||||
{
|
||||
send_to_buffer_as_input = 1;
|
||||
translated_string = 1;
|
||||
}
|
||||
else if (string_strcmp (argv[i], "-v") == 0)
|
||||
{
|
||||
display_upgrades = 1;
|
||||
}
|
||||
}
|
||||
|
||||
command_version_display (buffer, send_to_buffer_as_input,
|
||||
translated_string, 1);
|
||||
command_version_display (
|
||||
buffer,
|
||||
send_to_buffer_as_input,
|
||||
translated_string,
|
||||
1, /* display_git_version */
|
||||
display_upgrades);
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -7605,7 +7871,7 @@ COMMAND_CALLBACK(version)
|
||||
|
||||
COMMAND_CALLBACK(wait)
|
||||
{
|
||||
long long delay;
|
||||
unsigned long long delay;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
@@ -7613,7 +7879,8 @@ COMMAND_CALLBACK(wait)
|
||||
|
||||
COMMAND_MIN_ARGS(3, "");
|
||||
|
||||
delay = util_parse_delay (argv[1], 1000000);
|
||||
if (!util_parse_delay (argv[1], 1000000, &delay))
|
||||
COMMAND_ERROR;
|
||||
if (delay < 1)
|
||||
COMMAND_ERROR;
|
||||
|
||||
@@ -8026,9 +8293,11 @@ COMMAND_CALLBACK(window)
|
||||
*/
|
||||
|
||||
void
|
||||
command_init ()
|
||||
command_init (void)
|
||||
{
|
||||
hook_command (
|
||||
struct t_hook *ptr_hook;
|
||||
|
||||
ptr_hook = hook_command (
|
||||
NULL, "allbuf",
|
||||
N_("execute a command on all buffers"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
|
||||
@@ -8041,6 +8310,7 @@ command_init ()
|
||||
N_(" set read marker on all buffers:"),
|
||||
AI(" /allbuf /buffer set unread")),
|
||||
"%(commands:/)", &command_allbuf, NULL, NULL);
|
||||
COMMAND_KEEP_SPACES;
|
||||
hook_command (
|
||||
NULL, "away",
|
||||
N_("set or remove away status"),
|
||||
@@ -8076,7 +8346,7 @@ command_init ()
|
||||
N_("> raw[root]: outside windows"),
|
||||
N_("> raw[window]: inside windows, with optional conditions (see below)"),
|
||||
N_("conditions: the conditions to display the bar (without conditions, "
|
||||
"the bar is always displayed:"),
|
||||
"the bar is always displayed):"),
|
||||
N_("> raw[active]: on active window"),
|
||||
N_("> raw[inactive]: on inactive windows"),
|
||||
N_("> raw[nicklist]: on windows with nicklist"),
|
||||
@@ -8290,7 +8560,7 @@ command_init ()
|
||||
* give high priority (50000) so that an alias will not take precedence
|
||||
* over this command
|
||||
*/
|
||||
hook_command (
|
||||
ptr_hook = hook_command (
|
||||
NULL, "50000|command",
|
||||
N_("launch explicit WeeChat or plugin command"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
|
||||
@@ -8310,6 +8580,7 @@ command_init ()
|
||||
" || -s"
|
||||
" || %(plugins_names)|" PLUGIN_CORE " %(plugins_commands:/)",
|
||||
&command_command, NULL, NULL);
|
||||
COMMAND_KEEP_SPACES;
|
||||
hook_command (
|
||||
NULL, "cursor",
|
||||
N_("free movement of cursor on screen to execute actions on specific "
|
||||
@@ -8361,7 +8632,8 @@ command_init ()
|
||||
" || mouse|cursor [verbose]"
|
||||
" || hdata [free]"
|
||||
" || time <command>"
|
||||
" || unicode <string>"),
|
||||
" || unicode <string>"
|
||||
" || whitespace"),
|
||||
CMD_ARGS_DESC(
|
||||
N_("raw[list]: list plugins with debug levels"),
|
||||
N_("raw[set]: set debug level for plugin"),
|
||||
@@ -8403,6 +8675,9 @@ command_init ()
|
||||
"the current buffer"),
|
||||
N_("raw[unicode]: display information about string and unicode chars "
|
||||
"(evaluated, see /help eval)"),
|
||||
N_("raw[whitespace]: toggle whitespace mode: make spaces and tabulations "
|
||||
"visible in buffers and bars (see options weechat.look.whitespace_char "
|
||||
"and weechat.look.tab_whitespace_char)"),
|
||||
"",
|
||||
N_("Examples:"),
|
||||
AI(" /debug set irc 1"),
|
||||
@@ -8431,9 +8706,10 @@ command_init ()
|
||||
" || url"
|
||||
" || windows"
|
||||
" || time %(commands:/)"
|
||||
" || unicode",
|
||||
" || unicode"
|
||||
" || whitespace",
|
||||
&command_debug, NULL, NULL);
|
||||
hook_command (
|
||||
ptr_hook = hook_command (
|
||||
NULL, "eval",
|
||||
N_("evaluate expression"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
|
||||
@@ -8621,6 +8897,7 @@ command_init ()
|
||||
AI(" /eval -n -c abcd =- bc ==> 1")),
|
||||
"-n|-s|-c|%(eval_variables)|%*",
|
||||
&command_eval, NULL, NULL);
|
||||
COMMAND_KEEP_SPACES;
|
||||
hook_command (
|
||||
NULL, "filter",
|
||||
N_("filter messages in buffers, to hide/show them according to tags or "
|
||||
@@ -9070,11 +9347,11 @@ command_init ()
|
||||
AI(" /mouse toggle 5")),
|
||||
"enable|disable|toggle",
|
||||
&command_mouse, NULL, NULL);
|
||||
hook_command (
|
||||
ptr_hook = hook_command (
|
||||
NULL, "mute",
|
||||
N_("execute a command silently"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
|
||||
N_("[-core | -current | -buffer <name>] <command>"),
|
||||
N_("[-core|-current|-buffer <name>] <command>"),
|
||||
CMD_ARGS_DESC(
|
||||
N_("raw[-core]: no output on WeeChat core buffer"),
|
||||
N_("raw[-current]: no output on current buffer"),
|
||||
@@ -9095,6 +9372,63 @@ command_init ()
|
||||
" || -buffer %(buffers_plugins_names) %(commands:/)|%*"
|
||||
" || %(commands:/)|%*",
|
||||
&command_mute, NULL, NULL);
|
||||
COMMAND_KEEP_SPACES;
|
||||
ptr_hook = hook_command (
|
||||
NULL, "pipe",
|
||||
N_("redirect command output to a buffer, a file or a hsignal"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
|
||||
N_("[-buffer <name>|-file <filename>|-hsignal <name>] "
|
||||
"[-color strip|keep|ansi] [-concat <separator>] "
|
||||
"[-strip <chars>] [-skipempty] [-c] [-o] [-g] [-nl] <command>"),
|
||||
CMD_ARGS_DESC(
|
||||
N_("raw[-buffer]: display command output on this buffer"),
|
||||
N_("name: full buffer name (examples: \"core.weechat\", "
|
||||
"\"irc.server.libera\", \"irc.libera.#weechat\")"),
|
||||
N_("raw[-file]: write command output in this file"),
|
||||
N_("raw[-hsignal]: send command output as hsignal; "
|
||||
"keys: \"command\", \"output\" (lines separated by separator) "
|
||||
"and \"tags\" (tags of each line separated by newline)"),
|
||||
N_("raw[-color]: convert colors"),
|
||||
N_("raw[-o]: send command output to the buffer as input; "
|
||||
"colors are stripped and commands are NOT executed "
|
||||
"(used only with -buffer)"),
|
||||
N_("raw[-concat]: concatenate all lines displayed using a separator; "
|
||||
"chars can be escaped (example: \\x20 for space)"),
|
||||
N_("raw[-strip]: strip chars from lines (beginning/end); "
|
||||
"chars can be escaped (example: \\x20 for space)"),
|
||||
N_("raw[-skipempty]: skip empty lines when lines are concatenated"),
|
||||
N_("raw[-c]: alias for \"-concat \\x20 -strip \\x20 -skipempty\""),
|
||||
N_("raw[-nl]: display messages in English during the command execution "
|
||||
"(do not use the current locale)"),
|
||||
N_("command: command to execute (a \"/\" is automatically added "
|
||||
"if not found at beginning of command)"),
|
||||
"",
|
||||
N_("If no target is specified (\"-buffer\", \"-file\" or \"-hsignal\"), "
|
||||
"then the command output is sent on the current buffer."),
|
||||
"",
|
||||
N_("Note: for commands that display messages in an asynchronous way "
|
||||
"(like /exec and many IRC commands), the output will not be "
|
||||
"caught by this command."),
|
||||
N_("For example \"/pipe /whois nick\" will NOT redirect the answer "
|
||||
"from IRC server to the current buffer."),
|
||||
"",
|
||||
N_("Examples:"),
|
||||
N_(" write info about external libraries in a file:"),
|
||||
AI(" /pipe -file /tmp/libs.txt /debug libs"),
|
||||
N_(" send output of \"/debug libs\" as a single line on current channel:"),
|
||||
AI(" /pipe -o -c /debug libs"),
|
||||
N_(" display info about all buffers on current buffer:"),
|
||||
AI(" /pipe /allbuf /eval /print ${buffer.full_name} -> "
|
||||
"${buffer.number}. ${buffer.short_name} (${buffer})"),
|
||||
N_(" send list of filters on current channel, in English:"),
|
||||
AI(" /pipe -o -nl /filter")),
|
||||
"-buffer %(buffers_plugins_names) %(commands:/)|%*"
|
||||
" || -file %(filename) %(commands:/)|%*"
|
||||
" || -hsignal %- %(commands:/)|%*"
|
||||
" || -o %(commands:/)|%*"
|
||||
" || %(commands:/)|%*",
|
||||
&command_pipe, NULL, NULL);
|
||||
COMMAND_KEEP_SPACES;
|
||||
hook_command (
|
||||
NULL, "plugin",
|
||||
N_("list/load/unload plugins"),
|
||||
@@ -9133,7 +9467,7 @@ command_init ()
|
||||
" || reload %(plugins_names)|* -a|-s"
|
||||
" || unload %(plugins_names)",
|
||||
&command_plugin, NULL, NULL);
|
||||
hook_command (
|
||||
ptr_hook = hook_command (
|
||||
NULL, "print",
|
||||
N_("display text on a buffer"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
|
||||
@@ -9201,6 +9535,7 @@ command_init ()
|
||||
" || -stderr"
|
||||
" || -beep",
|
||||
&command_print, NULL, NULL);
|
||||
COMMAND_KEEP_SPACES;
|
||||
hook_command (
|
||||
NULL, "proxy",
|
||||
N_("manage proxies"),
|
||||
@@ -9242,7 +9577,7 @@ command_init ()
|
||||
" || del %(proxies_names)|%*"
|
||||
" || set %(proxies_names) %(proxies_options)",
|
||||
&command_proxy, NULL, NULL);
|
||||
hook_command (
|
||||
ptr_hook = hook_command (
|
||||
NULL, "quit",
|
||||
N_("quit WeeChat"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
|
||||
@@ -9259,6 +9594,7 @@ command_init ()
|
||||
"\"weechat.look.save_layout_on_exit\").")),
|
||||
"",
|
||||
&command_quit, NULL, NULL);
|
||||
COMMAND_KEEP_SPACES;
|
||||
hook_command (
|
||||
NULL, "reload",
|
||||
N_("reload configuration files from disk"),
|
||||
@@ -9270,7 +9606,7 @@ command_init ()
|
||||
N_("Without argument, all files (WeeChat and plugins) are reloaded.")),
|
||||
"%(config_files)|%*",
|
||||
&command_reload, NULL, NULL);
|
||||
hook_command (
|
||||
ptr_hook = hook_command (
|
||||
NULL, "repeat",
|
||||
N_("execute a command several times"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
|
||||
@@ -9307,6 +9643,7 @@ command_init ()
|
||||
AI(" /repeat -interval 1 6 /print ${if:${repeat_last}?Boom!:${repeat_revindex0}}")),
|
||||
"%- %(commands:/)",
|
||||
&command_repeat, NULL, NULL);
|
||||
COMMAND_KEEP_SPACES;
|
||||
hook_command (
|
||||
NULL, "reset",
|
||||
N_("reset config options"),
|
||||
@@ -9594,17 +9931,18 @@ command_init ()
|
||||
hook_command (
|
||||
NULL, "version",
|
||||
N_("show WeeChat version and compilation date"),
|
||||
"[-o|-ol]",
|
||||
"[-o|-ol] [-v]",
|
||||
CMD_ARGS_DESC(
|
||||
N_("raw[-o]: send version to current buffer as input (English string)"),
|
||||
N_("raw[-ol]: send version to current buffer as input (translated string)"),
|
||||
N_("raw[-v]: verbose mode: display information about upgrades of WeeChat with /upgrade"),
|
||||
"",
|
||||
N_("The default alias /v can be used to execute this command on "
|
||||
"all buffers (otherwise the irc command /version is used on irc "
|
||||
"buffers).")),
|
||||
"-o|-ol",
|
||||
"-o|-ol|-v|%*",
|
||||
&command_version, NULL, NULL);
|
||||
hook_command (
|
||||
ptr_hook = hook_command (
|
||||
NULL, "wait",
|
||||
N_("schedule a command execution in future"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
|
||||
@@ -9633,6 +9971,7 @@ command_init ()
|
||||
N_(" /wait 2m hello")),
|
||||
"%- %(commands:/)",
|
||||
&command_wait, NULL, NULL);
|
||||
COMMAND_KEEP_SPACES;
|
||||
hook_command (
|
||||
NULL, "window",
|
||||
N_("manage windows"),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
@@ -85,6 +85,8 @@ struct t_gui_buffer;
|
||||
#define CMD_ARGS_DESC(args...) \
|
||||
STR_CONCAT("\n", WEECHAT_HOOK_COMMAND_STR_FORMATTED, ##args)
|
||||
|
||||
#define COMMAND_KEEP_SPACES hook_set (ptr_hook, "keep_spaces_right", "1")
|
||||
|
||||
struct t_command_repeat
|
||||
{
|
||||
char *buffer_name; /* full buffer name */
|
||||
@@ -94,12 +96,13 @@ struct t_command_repeat
|
||||
int index; /* current index (starts at 1) */
|
||||
};
|
||||
|
||||
extern const char *command_help_option_color_values ();
|
||||
extern const char *command_help_option_color_values (void);
|
||||
extern void command_version_display (struct t_gui_buffer *buffer,
|
||||
int send_to_buffer_as_input,
|
||||
int translated_string,
|
||||
int display_git_version);
|
||||
extern void command_init ();
|
||||
int display_git_version,
|
||||
int display_upgrades);
|
||||
extern void command_init (void);
|
||||
extern void command_startup (int plugins_loaded);
|
||||
|
||||
#endif /* WEECHAT_COMMAND_H */
|
||||
|
||||
+23
-47
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-completion.c - completion for WeeChat commands
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
@@ -71,17 +71,12 @@ completion_list_add_quoted_word (struct t_gui_completion *completion,
|
||||
const char *word)
|
||||
{
|
||||
char *temp;
|
||||
int length;
|
||||
|
||||
length = 1 + strlen (word) + 1 + 1;
|
||||
temp = malloc (length);
|
||||
if (!temp)
|
||||
return;
|
||||
|
||||
snprintf (temp, length, "\"%s\"", word);
|
||||
gui_completion_list_add (completion, temp, 0, WEECHAT_LIST_POS_END);
|
||||
|
||||
free (temp);
|
||||
if (string_asprintf (&temp, "\"%s\"", word) >= 0)
|
||||
{
|
||||
gui_completion_list_add (completion, temp, 0, WEECHAT_LIST_POS_END);
|
||||
free (temp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1221,7 +1216,6 @@ completion_list_add_config_options_cb (const void *pointer, void *data,
|
||||
struct t_config_file *ptr_config;
|
||||
struct t_config_section *ptr_section;
|
||||
struct t_config_option *ptr_option;
|
||||
int length;
|
||||
char *option_full_name;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -1239,15 +1233,12 @@ completion_list_add_config_options_cb (const void *pointer, void *data,
|
||||
for (ptr_option = ptr_section->options; ptr_option;
|
||||
ptr_option = ptr_option->next_option)
|
||||
{
|
||||
length = strlen (ptr_config->name) + 1
|
||||
+ strlen (ptr_section->name) + 1
|
||||
+ strlen (ptr_option->name) + 1;
|
||||
option_full_name = malloc (length);
|
||||
if (option_full_name)
|
||||
if (string_asprintf (&option_full_name,
|
||||
"%s.%s.%s",
|
||||
ptr_config->name,
|
||||
ptr_section->name,
|
||||
ptr_option->name) >= 0)
|
||||
{
|
||||
snprintf (option_full_name, length, "%s.%s.%s",
|
||||
ptr_config->name, ptr_section->name,
|
||||
ptr_option->name);
|
||||
gui_completion_list_add (completion,
|
||||
option_full_name,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
@@ -1334,7 +1325,6 @@ completion_list_add_plugins_installed_cb (const void *pointer, void *data,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
char *plugin_path, *dir_name, *extra_libdir;
|
||||
int length;
|
||||
struct t_hashtable *options;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -1347,11 +1337,8 @@ completion_list_add_plugins_installed_cb (const void *pointer, void *data,
|
||||
extra_libdir = getenv (WEECHAT_EXTRA_LIBDIR);
|
||||
if (extra_libdir && extra_libdir[0])
|
||||
{
|
||||
length = strlen (extra_libdir) + 16 + 1;
|
||||
dir_name = malloc (length);
|
||||
if (dir_name)
|
||||
if (string_asprintf (&dir_name, "%s/plugins", extra_libdir) >= 0)
|
||||
{
|
||||
snprintf (dir_name, length, "%s/plugins", extra_libdir);
|
||||
dir_exec_on_files (dir_name, 1, 0,
|
||||
&completion_list_add_plugins_installed_exec_cb,
|
||||
completion);
|
||||
@@ -1383,11 +1370,8 @@ completion_list_add_plugins_installed_cb (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/* plugins in WeeChat global lib dir */
|
||||
length = strlen (WEECHAT_LIBDIR) + 16 + 1;
|
||||
dir_name = malloc (length);
|
||||
if (dir_name)
|
||||
if (string_asprintf (&dir_name, "%s/plugins", WEECHAT_LIBDIR) >= 0)
|
||||
{
|
||||
snprintf (dir_name, length, "%s/plugins", WEECHAT_LIBDIR);
|
||||
dir_exec_on_files (dir_name, 1, 0,
|
||||
&completion_list_add_plugins_installed_exec_cb,
|
||||
completion);
|
||||
@@ -1500,7 +1484,6 @@ completion_list_add_config_option_values_cb (const void *pointer, void *data,
|
||||
char *pos_space, *option_full_name, *pos_section, *pos_option;
|
||||
char *file, *section, *value_string, **ptr_value;
|
||||
const char *color_name;
|
||||
int length;
|
||||
struct t_config_file *ptr_config;
|
||||
struct t_config_section *ptr_section, *section_found;
|
||||
struct t_config_option *option_found;
|
||||
@@ -1587,12 +1570,11 @@ completion_list_add_config_option_values_cb (const void *pointer, void *data,
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
if (option_found->value)
|
||||
{
|
||||
length = 64;
|
||||
value_string = malloc (length);
|
||||
if (value_string)
|
||||
if (string_asprintf (
|
||||
&value_string,
|
||||
"%d",
|
||||
CONFIG_INTEGER(option_found)) >= 0)
|
||||
{
|
||||
snprintf (value_string, length,
|
||||
"%d", CONFIG_INTEGER(option_found));
|
||||
gui_completion_list_add (completion,
|
||||
value_string,
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
@@ -1612,13 +1594,11 @@ completion_list_add_config_option_values_cb (const void *pointer, void *data,
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
if (option_found->value)
|
||||
{
|
||||
length = strlen (CONFIG_STRING(option_found)) + 2 + 1;
|
||||
value_string = malloc (length);
|
||||
if (value_string)
|
||||
if (string_asprintf (
|
||||
&value_string,
|
||||
"\"%s\"",
|
||||
CONFIG_STRING(option_found)) >= 0)
|
||||
{
|
||||
snprintf (value_string, length,
|
||||
"\"%s\"",
|
||||
CONFIG_STRING(option_found));
|
||||
gui_completion_list_add (completion,
|
||||
value_string,
|
||||
0, WEECHAT_LIST_POS_BEGINNING);
|
||||
@@ -2126,17 +2106,13 @@ completion_list_map_eval_buffer_local_variable_cb (void *data,
|
||||
const void *key, const void *value)
|
||||
{
|
||||
char *name;
|
||||
int length;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) hashtable;
|
||||
(void) value;
|
||||
|
||||
length = strlen (key) + 3 + 1;
|
||||
name = malloc (length);
|
||||
if (name)
|
||||
if (string_asprintf (&name, "${%s}", (const char *)key) >= 0)
|
||||
{
|
||||
snprintf (name, length, "${%s}", (const char *)key);
|
||||
gui_completion_list_add ((struct t_gui_completion *)data,
|
||||
name, 0, WEECHAT_LIST_POS_SORT);
|
||||
free (name);
|
||||
@@ -2251,7 +2227,7 @@ completion_list_add_eval_variables_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
completion_init ()
|
||||
completion_init (void)
|
||||
{
|
||||
hook_completion (NULL, "buffers_names", /* formerly "%b" */
|
||||
N_("names of buffers"),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
@@ -28,6 +28,6 @@ extern int completion_list_add_filename_cb (const void *pointer,
|
||||
const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion);
|
||||
extern void completion_init ();
|
||||
extern void completion_init (void);
|
||||
|
||||
#endif /* WEECHAT_COMPLETION_H */
|
||||
|
||||
+65
-101
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-config-file.c - configuration files/sections/options management
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
@@ -201,8 +201,7 @@ config_file_new (struct t_weechat_plugin *plugin, const char *name,
|
||||
{
|
||||
struct t_config_file *new_config_file;
|
||||
const char *ptr_name;
|
||||
char *filename;
|
||||
int priority, length;
|
||||
int priority;
|
||||
|
||||
string_get_priority_and_name (name, &priority, &ptr_name,
|
||||
CONFIG_PRIORITY_DEFAULT);
|
||||
@@ -225,16 +224,7 @@ config_file_new (struct t_weechat_plugin *plugin, const char *name,
|
||||
free (new_config_file);
|
||||
return NULL;
|
||||
}
|
||||
new_config_file->filename = NULL;
|
||||
length = strlen (ptr_name) + 8 + 1;
|
||||
filename = malloc (length);
|
||||
if (filename)
|
||||
{
|
||||
snprintf (filename, length, "%s.conf", ptr_name);
|
||||
new_config_file->filename = strdup (filename);
|
||||
free (filename);
|
||||
}
|
||||
if (!new_config_file->filename)
|
||||
if (string_asprintf (&new_config_file->filename, "%s.conf", ptr_name) < 0)
|
||||
{
|
||||
free (new_config_file->name);
|
||||
free (new_config_file);
|
||||
@@ -321,7 +311,7 @@ config_file_arraylist_cmp_config_cb (void *data,
|
||||
*/
|
||||
|
||||
struct t_arraylist *
|
||||
config_file_get_configs_by_priority ()
|
||||
config_file_get_configs_by_priority (void)
|
||||
{
|
||||
struct t_arraylist *list;
|
||||
struct t_config_file *ptr_config;
|
||||
@@ -501,23 +491,16 @@ config_file_search_section (struct t_config_file *config_file,
|
||||
char *
|
||||
config_file_option_full_name (struct t_config_option *option)
|
||||
{
|
||||
int length_option;
|
||||
char *option_full_name;
|
||||
|
||||
if (!option)
|
||||
return NULL;
|
||||
|
||||
length_option = strlen (option->config_file->name) + 1 +
|
||||
strlen (option->section->name) + 1 + strlen (option->name) + 1;
|
||||
option_full_name = malloc (length_option);
|
||||
if (option_full_name)
|
||||
{
|
||||
snprintf (option_full_name, length_option,
|
||||
"%s.%s.%s",
|
||||
option->config_file->name,
|
||||
option->section->name,
|
||||
option->name);
|
||||
}
|
||||
string_asprintf (&option_full_name,
|
||||
"%s.%s.%s",
|
||||
option->config_file->name,
|
||||
option->section->name,
|
||||
option->name);
|
||||
|
||||
return option_full_name;
|
||||
}
|
||||
@@ -650,7 +633,7 @@ config_file_option_insert_in_section (struct t_config_option *option)
|
||||
*/
|
||||
|
||||
struct t_config_option *
|
||||
config_file_option_malloc ()
|
||||
config_file_option_malloc (void)
|
||||
{
|
||||
struct t_config_option *new_option;
|
||||
|
||||
@@ -2373,7 +2356,7 @@ config_file_option_value_to_string (struct t_config_option *option,
|
||||
{
|
||||
char *value;
|
||||
const char *ptr_value;
|
||||
int enabled, length;
|
||||
int enabled;
|
||||
|
||||
if (!option)
|
||||
return NULL;
|
||||
@@ -2381,14 +2364,11 @@ config_file_option_value_to_string (struct t_config_option *option,
|
||||
if ((default_value && !option->default_value)
|
||||
|| (!default_value && !option->value))
|
||||
{
|
||||
length = 7 + ((use_colors) ? 64 : 0) + 1;
|
||||
value = malloc (length);
|
||||
if (!value)
|
||||
return NULL;
|
||||
snprintf (value, length,
|
||||
"%s%s",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE_NULL) : "",
|
||||
"null");
|
||||
string_asprintf (
|
||||
&value,
|
||||
"%s%s",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE_NULL) : "",
|
||||
"null");
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -2397,66 +2377,51 @@ config_file_option_value_to_string (struct t_config_option *option,
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
enabled = (default_value) ?
|
||||
CONFIG_BOOLEAN_DEFAULT(option) : CONFIG_BOOLEAN(option);
|
||||
length = 7 + ((use_colors) ? 64 : 0) + 1;
|
||||
value = malloc (length);
|
||||
if (!value)
|
||||
return NULL;
|
||||
snprintf (value, length,
|
||||
"%s%s",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE) : "",
|
||||
(enabled) ? "on" : "off");
|
||||
string_asprintf (
|
||||
&value,
|
||||
"%s%s",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE) : "",
|
||||
(enabled) ? "on" : "off");
|
||||
return value;
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
length = 31 + ((use_colors) ? 64 : 0) + 1;
|
||||
value = malloc (length);
|
||||
if (!value)
|
||||
return NULL;
|
||||
snprintf (value, length,
|
||||
"%s%d",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE) : "",
|
||||
(default_value) ? CONFIG_INTEGER_DEFAULT(option) : CONFIG_INTEGER(option));
|
||||
string_asprintf (
|
||||
&value,
|
||||
"%s%d",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE) : "",
|
||||
(default_value) ? CONFIG_INTEGER_DEFAULT(option) : CONFIG_INTEGER(option));
|
||||
return value;
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
ptr_value = (default_value) ? CONFIG_STRING_DEFAULT(option) : CONFIG_STRING(option);
|
||||
length = strlen (ptr_value) + ((use_colors) ? 64 : 0) + 1;
|
||||
value = malloc (length);
|
||||
if (!value)
|
||||
return NULL;
|
||||
snprintf (value, length,
|
||||
"%s%s%s%s%s%s",
|
||||
(use_colors && use_delimiters) ? GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS) : "",
|
||||
(use_delimiters) ? "\"" : "",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE) : "",
|
||||
ptr_value,
|
||||
(use_colors && use_delimiters) ? GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS) : "",
|
||||
(use_delimiters) ? "\"" : "");
|
||||
string_asprintf (
|
||||
&value,
|
||||
"%s%s%s%s%s%s",
|
||||
(use_colors && use_delimiters) ? GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS) : "",
|
||||
(use_delimiters) ? "\"" : "",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE) : "",
|
||||
ptr_value,
|
||||
(use_colors && use_delimiters) ? GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS) : "",
|
||||
(use_delimiters) ? "\"" : "");
|
||||
return value;
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
ptr_value = gui_color_get_name (
|
||||
(default_value) ? CONFIG_COLOR_DEFAULT(option) : CONFIG_COLOR(option));
|
||||
if (!ptr_value)
|
||||
return NULL;
|
||||
length = strlen (ptr_value) + ((use_colors) ? 64 : 0) + 1;
|
||||
value = malloc (length);
|
||||
if (!value)
|
||||
return NULL;
|
||||
snprintf (value, length,
|
||||
"%s%s",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE) : "",
|
||||
ptr_value);
|
||||
string_asprintf (
|
||||
&value,
|
||||
"%s%s",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE) : "",
|
||||
ptr_value);
|
||||
return value;
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
ptr_value = (default_value) ?
|
||||
option->string_values[CONFIG_ENUM_DEFAULT(option)] :
|
||||
option->string_values[CONFIG_ENUM(option)];
|
||||
length = strlen (ptr_value) + ((use_colors) ? 64 : 0) + 1;
|
||||
value = malloc (length);
|
||||
if (!value)
|
||||
return NULL;
|
||||
snprintf (value, length,
|
||||
"%s%s",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE) : "",
|
||||
ptr_value);
|
||||
option->string_values[CONFIG_ENUM(option)];
|
||||
string_asprintf (
|
||||
&value,
|
||||
"%s%s",
|
||||
(use_colors) ? GUI_COLOR(GUI_COLOR_CHAT_VALUE) : "",
|
||||
ptr_value);
|
||||
return value;
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
/* make C compiler happy */
|
||||
@@ -3187,7 +3152,7 @@ int
|
||||
config_file_write_internal (struct t_config_file *config_file,
|
||||
int default_options)
|
||||
{
|
||||
int filename_length, rc;
|
||||
int rc;
|
||||
long file_perms;
|
||||
char *filename, *filename2, resolved_path[PATH_MAX], *error;
|
||||
struct t_config_section *ptr_section;
|
||||
@@ -3197,25 +3162,24 @@ config_file_write_internal (struct t_config_file *config_file,
|
||||
return WEECHAT_CONFIG_WRITE_ERROR;
|
||||
|
||||
/* build filename */
|
||||
filename_length = strlen (weechat_config_dir) + strlen (DIR_SEPARATOR) +
|
||||
strlen (config_file->filename) + 1;
|
||||
filename = malloc (filename_length);
|
||||
if (!filename)
|
||||
if (string_asprintf (&filename,
|
||||
"%s%s%s",
|
||||
weechat_config_dir,
|
||||
DIR_SEPARATOR,
|
||||
config_file->filename) < 0)
|
||||
{
|
||||
return WEECHAT_CONFIG_WRITE_MEMORY_ERROR;
|
||||
snprintf (filename, filename_length, "%s%s%s",
|
||||
weechat_config_dir, DIR_SEPARATOR, config_file->filename);
|
||||
}
|
||||
|
||||
/*
|
||||
* build temporary filename, this temp file will be renamed to filename
|
||||
* after write
|
||||
*/
|
||||
filename2 = malloc (filename_length + 32);
|
||||
if (!filename2)
|
||||
if (string_asprintf (&filename2, "%s.weechattmp", filename) < 0)
|
||||
{
|
||||
free (filename);
|
||||
return WEECHAT_CONFIG_WRITE_MEMORY_ERROR;
|
||||
}
|
||||
snprintf (filename2, filename_length + 32, "%s.weechattmp", filename);
|
||||
|
||||
/* if filename is a symbolic link, use target as filename */
|
||||
if (realpath (filename, resolved_path))
|
||||
@@ -3624,8 +3588,7 @@ config_file_update_data_read (struct t_config_file *config_file,
|
||||
int
|
||||
config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
{
|
||||
int filename_length, line_number, rc, length, version;
|
||||
int warning_update_displayed;
|
||||
int line_number, rc, length, version, warning_update_displayed;
|
||||
char *filename, *section, *option, *value;
|
||||
struct t_config_section *ptr_section;
|
||||
struct t_config_option *ptr_option;
|
||||
@@ -3638,13 +3601,14 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
warning_update_displayed = 0;
|
||||
|
||||
/* build filename */
|
||||
filename_length = strlen (weechat_config_dir) + strlen (DIR_SEPARATOR) +
|
||||
strlen (config_file->filename) + 1;
|
||||
filename = malloc (filename_length);
|
||||
if (!filename)
|
||||
if (string_asprintf (&filename,
|
||||
"%s%s%s",
|
||||
weechat_config_dir,
|
||||
DIR_SEPARATOR,
|
||||
config_file->filename) < 0)
|
||||
{
|
||||
return WEECHAT_CONFIG_READ_MEMORY_ERROR;
|
||||
snprintf (filename, filename_length, "%s%s%s",
|
||||
weechat_config_dir, DIR_SEPARATOR, config_file->filename);
|
||||
}
|
||||
|
||||
/* create file with default options if it does not exist */
|
||||
if (access (filename, F_OK) != 0)
|
||||
@@ -4186,7 +4150,7 @@ config_file_free (struct t_config_file *config_file)
|
||||
*/
|
||||
|
||||
void
|
||||
config_file_free_all ()
|
||||
config_file_free_all (void)
|
||||
{
|
||||
while (config_files)
|
||||
{
|
||||
@@ -4533,7 +4497,7 @@ config_file_add_to_infolist (struct t_infolist *infolist,
|
||||
*/
|
||||
|
||||
void
|
||||
config_file_print_log ()
|
||||
config_file_print_log (void)
|
||||
{
|
||||
struct t_config_file *ptr_config_file;
|
||||
struct t_config_section *ptr_section;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
@@ -205,7 +205,7 @@ extern int config_file_set_version (struct t_config_file *config_file,
|
||||
struct t_hashtable *data_read),
|
||||
const void *callback_update_pointer,
|
||||
void *callback_update_data);
|
||||
extern struct t_arraylist *config_file_get_configs_by_priority ();
|
||||
extern struct t_arraylist *config_file_get_configs_by_priority (void);
|
||||
extern struct t_config_section *config_file_new_section (struct t_config_file *config_file,
|
||||
const char *name,
|
||||
int user_can_add_options,
|
||||
@@ -340,7 +340,7 @@ extern void config_file_option_free (struct t_config_option *option,
|
||||
extern void config_file_section_free_options (struct t_config_section *section);
|
||||
extern void config_file_section_free (struct t_config_section *section);
|
||||
extern void config_file_free (struct t_config_file *config_file);
|
||||
extern void config_file_free_all ();
|
||||
extern void config_file_free_all (void);
|
||||
extern void config_file_free_all_plugin (struct t_weechat_plugin *plugin);
|
||||
extern struct t_hdata *config_file_hdata_config_file_cb (const void *pointer,
|
||||
void *data,
|
||||
@@ -353,6 +353,6 @@ extern struct t_hdata *config_file_hdata_config_option_cb (const void *pointer,
|
||||
const char *hdata_name);
|
||||
extern int config_file_add_to_infolist (struct t_infolist *infolist,
|
||||
const char *option_name);
|
||||
extern void config_file_print_log ();
|
||||
extern void config_file_print_log (void);
|
||||
|
||||
#endif /* WEECHAT_CONFIG_FILE_H */
|
||||
|
||||
+153
-24
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-config.c - WeeChat configuration options (file weechat.conf)
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
@@ -217,8 +217,10 @@ struct t_config_option *config_look_scroll_page_percent = NULL;
|
||||
struct t_config_option *config_look_search_text_not_found_alert = NULL;
|
||||
struct t_config_option *config_look_separator_horizontal = NULL;
|
||||
struct t_config_option *config_look_separator_vertical = NULL;
|
||||
struct t_config_option *config_look_tab_whitespace_char = NULL;
|
||||
struct t_config_option *config_look_tab_width = NULL;
|
||||
struct t_config_option *config_look_time_format = NULL;
|
||||
struct t_config_option *config_look_whitespace_char = NULL;
|
||||
struct t_config_option *config_look_window_auto_zoom = NULL;
|
||||
struct t_config_option *config_look_window_separator_horizontal = NULL;
|
||||
struct t_config_option *config_look_window_separator_vertical = NULL;
|
||||
@@ -307,6 +309,7 @@ struct t_config_option *config_completion_nick_case_sensitive = NULL;
|
||||
struct t_config_option *config_completion_nick_completer = NULL;
|
||||
struct t_config_option *config_completion_nick_first_only = NULL;
|
||||
struct t_config_option *config_completion_nick_ignore_chars = NULL;
|
||||
struct t_config_option *config_completion_nick_ignore_words = NULL;
|
||||
struct t_config_option *config_completion_partial_completion_alert = NULL;
|
||||
struct t_config_option *config_completion_partial_completion_command = NULL;
|
||||
struct t_config_option *config_completion_partial_completion_command_arg = NULL;
|
||||
@@ -361,6 +364,7 @@ int config_num_highlight_tags = 0;
|
||||
char **config_plugin_extensions = NULL;
|
||||
int config_num_plugin_extensions = 0;
|
||||
char config_tab_spaces[TAB_MAX_WIDTH + 1];
|
||||
char config_tab_spaces_whitespace[(TAB_MAX_WIDTH * 4) + 1];
|
||||
struct t_config_look_word_char_item *config_word_chars_highlight = NULL;
|
||||
int config_word_chars_highlight_count = 0;
|
||||
struct t_config_look_word_char_item *config_word_chars_input = NULL;
|
||||
@@ -372,6 +376,7 @@ char **config_eval_syntax_colors = NULL;
|
||||
int config_num_eval_syntax_colors = 0;
|
||||
char *config_item_time_evaluated = NULL;
|
||||
char *config_buffer_time_same_evaluated = NULL;
|
||||
struct t_hashtable *config_hashtable_completion_nick_ignore_words = NULL;
|
||||
struct t_hashtable *config_hashtable_completion_partial_templates = NULL;
|
||||
char **config_hotlist_sort_fields = NULL;
|
||||
int config_num_hotlist_sort_fields = 0;
|
||||
@@ -428,7 +433,7 @@ config_check_config_permissions (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_save_config_layout_on_exit ()
|
||||
config_change_save_config_layout_on_exit (void)
|
||||
{
|
||||
if (gui_init_ok && !CONFIG_BOOLEAN(config_look_save_config_on_exit)
|
||||
&& (CONFIG_ENUM(config_look_save_layout_on_exit) != CONFIG_LOOK_SAVE_LAYOUT_ON_EXIT_NONE))
|
||||
@@ -493,12 +498,8 @@ config_change_window_title (const void *pointer, void *data,
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
if (gui_init_ok
|
||||
|| (CONFIG_STRING(config_look_window_title)
|
||||
&& CONFIG_STRING(config_look_window_title)[0]))
|
||||
{
|
||||
if (gui_init_ok)
|
||||
gui_window_set_title (CONFIG_STRING(config_look_window_title));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -761,7 +762,7 @@ config_change_buffer_time_same (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
config_compute_prefix_max_length_all_buffers ()
|
||||
config_compute_prefix_max_length_all_buffers (void)
|
||||
{
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
@@ -780,7 +781,7 @@ config_compute_prefix_max_length_all_buffers ()
|
||||
*/
|
||||
|
||||
void
|
||||
config_set_nick_colors ()
|
||||
config_set_nick_colors (void)
|
||||
{
|
||||
if (config_nick_colors)
|
||||
{
|
||||
@@ -859,7 +860,7 @@ config_change_look_nick_color_force (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
config_set_eval_syntax_colors ()
|
||||
config_set_eval_syntax_colors (void)
|
||||
{
|
||||
if (config_eval_syntax_colors)
|
||||
{
|
||||
@@ -1311,20 +1312,54 @@ config_check_separator (const void *pointer, void *data,
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on option "weechat.look.tab_width".
|
||||
* Checks options "weechat.look.whitespace_char" and
|
||||
* "weechat.look.tab_whitespace_char".
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_tab_width (const void *pointer, void *data,
|
||||
struct t_config_option *option)
|
||||
int
|
||||
config_check_whitespace_char (const void *pointer, void *data,
|
||||
struct t_config_option *option,
|
||||
const char *value)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
memset (config_tab_spaces, ' ', CONFIG_INTEGER(config_look_tab_width));
|
||||
config_tab_spaces[CONFIG_INTEGER(config_look_tab_width)] = '\0';
|
||||
return ((strlen (value) <= 4) && (utf8_strlen_screen (value) == 1)) ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on options "weechat.look.tab_width" and
|
||||
* "weechat.look.tab_whitespace_char".
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_tab (const void *pointer, void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
int tab_width, i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
tab_width = CONFIG_INTEGER(config_look_tab_width);
|
||||
|
||||
/* build a string with spaces that replace Tab char */
|
||||
memset (config_tab_spaces, ' ', tab_width);
|
||||
config_tab_spaces[tab_width] = '\0';
|
||||
|
||||
/* replaces spaces in whitespace mode */
|
||||
config_tab_spaces_whitespace[0] = '\0';
|
||||
strcat (config_tab_spaces_whitespace,
|
||||
CONFIG_STRING(config_look_tab_whitespace_char));
|
||||
for (i = 1; i < tab_width; i++)
|
||||
{
|
||||
strcat (config_tab_spaces_whitespace,
|
||||
CONFIG_STRING(config_look_whitespace_char));
|
||||
}
|
||||
|
||||
gui_window_ask_refresh (1);
|
||||
}
|
||||
@@ -1383,6 +1418,56 @@ config_change_eval_syntax_colors (const void *pointer, void *data,
|
||||
gui_color_buffer_display ();
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on option "weechat.completion.nick_ignore_words".
|
||||
*/
|
||||
|
||||
void
|
||||
config_change_completion_nick_ignore_words (const void *pointer,
|
||||
void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
char **words;
|
||||
int num_words, i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
if (!config_hashtable_completion_nick_ignore_words)
|
||||
{
|
||||
config_hashtable_completion_nick_ignore_words = hashtable_new (
|
||||
32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_POINTER,
|
||||
NULL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
hashtable_remove_all (config_hashtable_completion_nick_ignore_words);
|
||||
}
|
||||
|
||||
words = string_split (
|
||||
CONFIG_STRING(config_completion_nick_ignore_words),
|
||||
",",
|
||||
NULL,
|
||||
WEECHAT_STRING_SPLIT_STRIP_LEFT
|
||||
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
|
||||
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
|
||||
0,
|
||||
&num_words);
|
||||
if (words)
|
||||
{
|
||||
for (i = 0; i < num_words; i++)
|
||||
{
|
||||
hashtable_set (config_hashtable_completion_nick_ignore_words,
|
||||
words[i], NULL);
|
||||
}
|
||||
string_free_split (words);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on option
|
||||
* "weechat.completion.partial_completion_templates".
|
||||
@@ -1567,7 +1652,7 @@ config_day_change_timer_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
config_weechat_init_after_read ()
|
||||
config_weechat_init_after_read (void)
|
||||
{
|
||||
int context;
|
||||
|
||||
@@ -1922,7 +2007,7 @@ config_weechat_debug_get (const char *plugin_name)
|
||||
*/
|
||||
|
||||
void
|
||||
config_weechat_debug_set_all ()
|
||||
config_weechat_debug_set_all (void)
|
||||
{
|
||||
struct t_config_option *ptr_option;
|
||||
struct t_weechat_plugin *ptr_plugin;
|
||||
@@ -3142,7 +3227,7 @@ config_weechat_key_delete_option_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
int
|
||||
config_weechat_init_options ()
|
||||
config_weechat_init_options (void)
|
||||
{
|
||||
int context;
|
||||
char section_name[128];
|
||||
@@ -4336,13 +4421,24 @@ config_weechat_init_options ()
|
||||
&config_check_separator, NULL, NULL,
|
||||
&config_change_buffers, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_look_tab_whitespace_char = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"tab_whitespace_char", "string",
|
||||
N_("first char to display for tabulations when whitespace mode is "
|
||||
"enabled with command `/debug whitespace`; width on screen must "
|
||||
"be exactly one char; subsequent chars are set by option "
|
||||
"weechat.look.whitespace_char"),
|
||||
NULL, 0, 0, "→", NULL, 0,
|
||||
&config_check_whitespace_char, NULL, NULL,
|
||||
&config_change_tab, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_look_tab_width = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"tab_width", "integer",
|
||||
N_("number of spaces used to display tabs in messages"),
|
||||
NULL, 1, TAB_MAX_WIDTH, "1", NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
&config_change_tab_width, NULL, NULL,
|
||||
&config_change_tab, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_look_time_format = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
@@ -4351,6 +4447,16 @@ config_weechat_init_options ()
|
||||
"messages (see man strftime for date/time specifiers)"),
|
||||
NULL, 0, 0, "%a, %d %b %Y %T", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_whitespace_char = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"whitespace_char", "string",
|
||||
N_("char to display for spaces when whitespace mode is enabled with "
|
||||
"command `/debug whitespace`; width on screen must be exactly "
|
||||
"one char; see also option weechat.look.tab_whitespace_char"),
|
||||
NULL, 0, 0, "·", NULL, 0,
|
||||
&config_check_whitespace_char, NULL, NULL,
|
||||
&config_change_buffers, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_look_window_auto_zoom = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"window_auto_zoom", "boolean",
|
||||
@@ -5116,6 +5222,19 @@ config_weechat_init_options ()
|
||||
N_("chars ignored for nick completion"),
|
||||
NULL, 0, 0, "[]`_-^", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_completion_nick_ignore_words = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_completion,
|
||||
"nick_ignore_words", "string",
|
||||
N_("comma-separated list of nicks to ignore (not completed); "
|
||||
"the whole nick must be set in this option even if chars are "
|
||||
"ignored in completion with option "
|
||||
"weechat.completion.nick_ignore_chars; look up for nicks is with "
|
||||
"exact case then lower case, so it's possible to use only lower "
|
||||
"case for nicks in this option"),
|
||||
NULL, 0, 0, "", NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
&config_change_completion_nick_ignore_words, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_completion_partial_completion_alert = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_completion,
|
||||
"partial_completion_alert", "boolean",
|
||||
@@ -5469,7 +5588,7 @@ config_weechat_init_options ()
|
||||
*/
|
||||
|
||||
int
|
||||
config_weechat_init ()
|
||||
config_weechat_init (void)
|
||||
{
|
||||
int rc;
|
||||
struct timeval tv_time;
|
||||
@@ -5477,6 +5596,8 @@ config_weechat_init ()
|
||||
time_t seconds;
|
||||
|
||||
snprintf (config_tab_spaces, sizeof (config_tab_spaces), " ");
|
||||
snprintf (config_tab_spaces_whitespace, sizeof (config_tab_spaces_whitespace),
|
||||
"\u2192");
|
||||
|
||||
rc = config_weechat_init_options ();
|
||||
|
||||
@@ -5512,6 +5633,8 @@ config_weechat_init ()
|
||||
config_change_word_chars_highlight (NULL, NULL, NULL);
|
||||
if (!config_word_chars_input)
|
||||
config_change_word_chars_input (NULL, NULL, NULL);
|
||||
if (!config_hashtable_completion_nick_ignore_words)
|
||||
config_change_completion_nick_ignore_words (NULL, NULL, NULL);
|
||||
if (!config_hashtable_completion_partial_templates)
|
||||
config_change_completion_partial_completion_templates (NULL, NULL, NULL);
|
||||
|
||||
@@ -5528,7 +5651,7 @@ config_weechat_init ()
|
||||
*/
|
||||
|
||||
int
|
||||
config_weechat_read ()
|
||||
config_weechat_read (void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
@@ -5551,7 +5674,7 @@ config_weechat_read ()
|
||||
*/
|
||||
|
||||
int
|
||||
config_weechat_write ()
|
||||
config_weechat_write (void)
|
||||
{
|
||||
return config_file_write (weechat_config_file);
|
||||
}
|
||||
@@ -5561,7 +5684,7 @@ config_weechat_write ()
|
||||
*/
|
||||
|
||||
void
|
||||
config_weechat_free ()
|
||||
config_weechat_free (void)
|
||||
{
|
||||
config_file_free (weechat_config_file);
|
||||
|
||||
@@ -5639,6 +5762,12 @@ config_weechat_free ()
|
||||
config_buffer_time_same_evaluated = NULL;
|
||||
}
|
||||
|
||||
if (config_hashtable_completion_nick_ignore_words)
|
||||
{
|
||||
hashtable_free (config_hashtable_completion_nick_ignore_words);
|
||||
config_hashtable_completion_nick_ignore_words = NULL;
|
||||
}
|
||||
|
||||
if (config_hashtable_completion_partial_templates)
|
||||
{
|
||||
hashtable_free (config_hashtable_completion_partial_templates);
|
||||
|
||||
+12
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
@@ -273,8 +273,10 @@ extern struct t_config_option *config_look_scroll_page_percent;
|
||||
extern struct t_config_option *config_look_search_text_not_found_alert;
|
||||
extern struct t_config_option *config_look_separator_horizontal;
|
||||
extern struct t_config_option *config_look_separator_vertical;
|
||||
extern struct t_config_option *config_look_tab_whitespace_char;
|
||||
extern struct t_config_option *config_look_tab_width;
|
||||
extern struct t_config_option *config_look_time_format;
|
||||
extern struct t_config_option *config_look_whitespace_char;
|
||||
extern struct t_config_option *config_look_window_auto_zoom;
|
||||
extern struct t_config_option *config_look_window_separator_horizontal;
|
||||
extern struct t_config_option *config_look_window_separator_vertical;
|
||||
@@ -356,6 +358,7 @@ extern struct t_config_option *config_completion_nick_case_sensitive;
|
||||
extern struct t_config_option *config_completion_nick_completer;
|
||||
extern struct t_config_option *config_completion_nick_first_only;
|
||||
extern struct t_config_option *config_completion_nick_ignore_chars;
|
||||
extern struct t_config_option *config_completion_nick_ignore_words;
|
||||
extern struct t_config_option *config_completion_partial_completion_alert;
|
||||
extern struct t_config_option *config_completion_partial_completion_command;
|
||||
extern struct t_config_option *config_completion_partial_completion_command_arg;
|
||||
@@ -397,6 +400,7 @@ extern int config_num_highlight_tags;
|
||||
extern char **config_plugin_extensions;
|
||||
extern int config_num_plugin_extensions;
|
||||
extern char config_tab_spaces[];
|
||||
extern char config_tab_spaces_whitespace[];
|
||||
extern struct t_config_look_word_char_item *config_word_chars_highlight;
|
||||
extern int config_word_chars_highlight_count;
|
||||
extern struct t_config_look_word_char_item *config_word_chars_input;
|
||||
@@ -407,24 +411,25 @@ extern struct t_hashtable *config_hashtable_nick_color_force;
|
||||
extern char **config_eval_syntax_colors;
|
||||
extern int config_num_eval_syntax_colors;
|
||||
extern char *config_buffer_time_same_evaluated;
|
||||
extern struct t_hashtable *config_hashtable_completion_nick_ignore_words;
|
||||
extern struct t_hashtable *config_hashtable_completion_partial_templates;
|
||||
extern char **config_hotlist_sort_fields;
|
||||
extern int config_num_hotlist_sort_fields;
|
||||
|
||||
extern void config_set_nick_colors ();
|
||||
extern void config_set_nick_colors (void);
|
||||
extern struct t_config_option *config_weechat_debug_get (const char *plugin_name);
|
||||
extern int config_weechat_debug_set (const char *plugin_name,
|
||||
const char *value);
|
||||
extern void config_weechat_debug_set_all ();
|
||||
extern void config_weechat_debug_set_all (void);
|
||||
extern int config_weechat_buffer_set (struct t_gui_buffer *buffer,
|
||||
const char *property, const char *value);
|
||||
extern int config_weechat_notify_set (struct t_gui_buffer *buffer,
|
||||
const char *notify);
|
||||
extern void config_get_item_time (char *text_time, int max_length);
|
||||
extern int config_weechat_get_key_context (struct t_config_section *section);
|
||||
extern int config_weechat_init ();
|
||||
extern int config_weechat_read ();
|
||||
extern int config_weechat_write ();
|
||||
extern void config_weechat_free ();
|
||||
extern int config_weechat_init (void);
|
||||
extern int config_weechat_read (void);
|
||||
extern int config_weechat_write (void);
|
||||
extern void config_weechat_free (void);
|
||||
|
||||
#endif /* WEECHAT_CONFIG_H */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-crypto.c - cryptographic functions
|
||||
*
|
||||
* Copyright (C) 2018-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2018-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2018-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
+17
-12
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-debug.c - debug functions
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
@@ -93,7 +93,7 @@ long long debug_long_callbacks = 0; /* callbacks taking more than */
|
||||
*/
|
||||
|
||||
void
|
||||
debug_build_info ()
|
||||
debug_build_info (void)
|
||||
{
|
||||
/* display version and compilation date/time */
|
||||
string_fprintf (
|
||||
@@ -228,8 +228,11 @@ debug_dump_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
debug_sigsegv_cb ()
|
||||
debug_sigsegv_cb (int signo)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) signo;
|
||||
|
||||
debug_dump (1);
|
||||
unhook_all ();
|
||||
gui_main_end (0);
|
||||
@@ -340,7 +343,7 @@ debug_windows_tree_display (struct t_gui_window_tree *tree, int indent)
|
||||
*/
|
||||
|
||||
void
|
||||
debug_windows_tree ()
|
||||
debug_windows_tree (void)
|
||||
{
|
||||
gui_chat_printf (NULL, "");
|
||||
gui_chat_printf (NULL, _("Windows tree:"));
|
||||
@@ -352,7 +355,7 @@ debug_windows_tree ()
|
||||
*/
|
||||
|
||||
void
|
||||
debug_memory ()
|
||||
debug_memory (void)
|
||||
{
|
||||
#ifdef HAVE_MALLINFO2
|
||||
struct mallinfo2 info;
|
||||
@@ -498,7 +501,7 @@ debug_hdata_map_cb (void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
debug_hdata ()
|
||||
debug_hdata (void)
|
||||
{
|
||||
int count;
|
||||
|
||||
@@ -516,7 +519,7 @@ debug_hdata ()
|
||||
*/
|
||||
|
||||
void
|
||||
debug_hooks ()
|
||||
debug_hooks (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -650,7 +653,7 @@ debug_hooks_plugin_types (const char *plugin_mask, const char **hook_types)
|
||||
*/
|
||||
|
||||
void
|
||||
debug_infolists ()
|
||||
debug_infolists (void)
|
||||
{
|
||||
struct t_infolist *ptr_infolist;
|
||||
struct t_infolist_item *ptr_item;
|
||||
@@ -814,7 +817,7 @@ debug_libs_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
debug_directories ()
|
||||
debug_directories (void)
|
||||
{
|
||||
char *extra_libdir, str_temp[1024];
|
||||
|
||||
@@ -862,7 +865,9 @@ debug_display_time_elapsed (struct timeval *time1, struct timeval *time2,
|
||||
|
||||
gettimeofday (&debug_timeval_end, NULL);
|
||||
diff = util_timeval_diff (time1, time2);
|
||||
str_diff = util_get_microseconds_string (diff);
|
||||
if (diff < 0)
|
||||
diff *= -1;
|
||||
str_diff = util_get_microseconds_string ((unsigned long long)diff);
|
||||
|
||||
if (display)
|
||||
{
|
||||
@@ -1023,7 +1028,7 @@ debug_unicode (const char *string)
|
||||
*/
|
||||
|
||||
void
|
||||
debug_init ()
|
||||
debug_init (void)
|
||||
{
|
||||
/*
|
||||
* hook signals with high priority, to be sure they will be used before
|
||||
@@ -1039,6 +1044,6 @@ debug_init ()
|
||||
*/
|
||||
|
||||
void
|
||||
debug_end ()
|
||||
debug_end (void)
|
||||
{
|
||||
}
|
||||
|
||||
+11
-11
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
@@ -26,22 +26,22 @@ struct t_gui_window_tree;
|
||||
|
||||
extern long long debug_long_callbacks;
|
||||
|
||||
extern void debug_build_info ();
|
||||
extern void debug_sigsegv_cb ();
|
||||
extern void debug_windows_tree ();
|
||||
extern void debug_memory ();
|
||||
extern void debug_hdata ();
|
||||
extern void debug_hooks ();
|
||||
extern void debug_build_info (void);
|
||||
extern void debug_sigsegv_cb (int signo);
|
||||
extern void debug_windows_tree (void);
|
||||
extern void debug_memory (void);
|
||||
extern void debug_hdata (void);
|
||||
extern void debug_hooks (void);
|
||||
extern void debug_hooks_plugin_types (const char *plugin_name,
|
||||
const char **hook_types);
|
||||
extern void debug_infolists ();
|
||||
extern void debug_directories ();
|
||||
extern void debug_infolists (void);
|
||||
extern void debug_directories (void);
|
||||
extern void debug_display_time_elapsed (struct timeval *time1,
|
||||
struct timeval *time2,
|
||||
const char *message,
|
||||
int display);
|
||||
extern void debug_unicode (const char *string);
|
||||
extern void debug_init ();
|
||||
extern void debug_end ();
|
||||
extern void debug_init (void);
|
||||
extern void debug_end (void);
|
||||
|
||||
#endif /* WEECHAT_DEBUG_H */
|
||||
|
||||
+18
-22
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-dir.c - directory/file functions
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
@@ -64,7 +64,7 @@
|
||||
*/
|
||||
|
||||
char *
|
||||
dir_get_temp_dir ()
|
||||
dir_get_temp_dir (void)
|
||||
{
|
||||
char *tmpdir;
|
||||
struct stat buf;
|
||||
@@ -109,7 +109,7 @@ int
|
||||
dir_mkdir_home (const char *directory, int mode)
|
||||
{
|
||||
char *dir, *dir1, *dir2, *dir3, *dir4, *dir5;
|
||||
int rc, dir_length;
|
||||
int rc;
|
||||
|
||||
rc = 0;
|
||||
dir = NULL;
|
||||
@@ -129,11 +129,8 @@ dir_mkdir_home (const char *directory, int mode)
|
||||
else
|
||||
{
|
||||
/* build directory in data dir by default */
|
||||
dir_length = strlen (weechat_data_dir) + strlen (directory) + 2;
|
||||
dir = malloc (dir_length);
|
||||
if (!dir)
|
||||
if (string_asprintf (&dir, "%s/%s", weechat_data_dir, directory) < 0)
|
||||
goto end;
|
||||
snprintf (dir, dir_length, "%s/%s", weechat_data_dir, directory);
|
||||
}
|
||||
|
||||
dir1 = string_replace (dir, "${weechat_config_dir}", weechat_config_dir);
|
||||
@@ -383,10 +380,10 @@ end:
|
||||
*/
|
||||
|
||||
int
|
||||
dir_create_home_temp_dir ()
|
||||
dir_create_home_temp_dir (void)
|
||||
{
|
||||
char *temp_dir, *temp_home_template, *ptr_weechat_home;
|
||||
int rc, length, add_separator;
|
||||
int rc, add_separator;
|
||||
|
||||
rc = 0;
|
||||
temp_dir = NULL;
|
||||
@@ -396,16 +393,15 @@ dir_create_home_temp_dir ()
|
||||
if (!temp_dir || !temp_dir[0])
|
||||
goto memory_error;
|
||||
|
||||
length = strlen (temp_dir) + 32 + 1;
|
||||
temp_home_template = malloc (length);
|
||||
if (!temp_home_template)
|
||||
goto memory_error;
|
||||
|
||||
add_separator = (temp_dir[strlen (temp_dir) - 1] != DIR_SEPARATOR_CHAR);
|
||||
snprintf (temp_home_template, length,
|
||||
"%s%sweechat_temp_XXXXXX",
|
||||
temp_dir,
|
||||
add_separator ? DIR_SEPARATOR : "");
|
||||
|
||||
if (string_asprintf (&temp_home_template,
|
||||
"%s%sweechat_temp_XXXXXX",
|
||||
temp_dir,
|
||||
(add_separator) ? DIR_SEPARATOR : "") < 0)
|
||||
{
|
||||
goto memory_error;
|
||||
}
|
||||
ptr_weechat_home = mkdtemp (temp_home_template);
|
||||
if (!ptr_weechat_home)
|
||||
{
|
||||
@@ -603,7 +599,7 @@ error:
|
||||
*/
|
||||
|
||||
int
|
||||
dir_find_home_dirs ()
|
||||
dir_find_home_dirs (void)
|
||||
{
|
||||
char *ptr_home, *ptr_weechat_home, *config_weechat_home;
|
||||
char *config_dir, *data_dir, *state_dir, *cache_dir, *runtime_dir;
|
||||
@@ -742,7 +738,7 @@ dir_create_home_dir (char *path)
|
||||
*/
|
||||
|
||||
void
|
||||
dir_create_home_dirs ()
|
||||
dir_create_home_dirs (void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
@@ -776,7 +772,7 @@ error:
|
||||
*/
|
||||
|
||||
void
|
||||
dir_remove_home_dirs ()
|
||||
dir_remove_home_dirs (void)
|
||||
{
|
||||
dir_rmtree (weechat_config_dir);
|
||||
if (strcmp (weechat_config_dir, weechat_data_dir) != 0)
|
||||
@@ -802,7 +798,7 @@ dir_remove_home_dirs ()
|
||||
*/
|
||||
|
||||
char *
|
||||
dir_get_string_home_dirs ()
|
||||
dir_get_string_home_dirs (void)
|
||||
{
|
||||
char *dirs[6];
|
||||
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
@@ -20,14 +20,14 @@
|
||||
#ifndef WEECHAT_DIR_H
|
||||
#define WEECHAT_DIR_H
|
||||
|
||||
extern char *dir_get_temp_dir();
|
||||
extern char *dir_get_temp_dir (void);
|
||||
extern int dir_mkdir_home (const char *directory, int mode);
|
||||
extern int dir_mkdir (const char *directory, int mode);
|
||||
extern int dir_mkdir_parents (const char *directory, int mode);
|
||||
extern int dir_rmtree (const char *directory);
|
||||
extern void dir_create_home_dirs ();
|
||||
extern void dir_remove_home_dirs ();
|
||||
extern char *dir_get_string_home_dirs ();
|
||||
extern void dir_create_home_dirs (void);
|
||||
extern void dir_remove_home_dirs (void);
|
||||
extern char *dir_get_string_home_dirs (void);
|
||||
extern void dir_exec_on_files (const char *directory, int recurse_subdirs,
|
||||
int hidden_files,
|
||||
void (*callback)(void *data,
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-doc.c - documentation generator
|
||||
*
|
||||
* Copyright (C) 2023-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2023-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2023-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
+12
-6
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* core-eval.c - evaluate expressions with references to internal vars
|
||||
*
|
||||
* Copyright (C) 2012-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2012-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
@@ -300,6 +300,9 @@ eval_string_range_chars (const char *range)
|
||||
string = NULL;
|
||||
result = NULL;
|
||||
|
||||
if (!range || !range[0])
|
||||
goto end;
|
||||
|
||||
for (i = 0; eval_range_chars[i][0]; i++)
|
||||
{
|
||||
if (strcmp (range, eval_range_chars[i][0]) == 0)
|
||||
@@ -309,11 +312,15 @@ eval_string_range_chars (const char *range)
|
||||
char1 = utf8_char_int (range);
|
||||
|
||||
/* next char must be '-' */
|
||||
if (!range[0])
|
||||
goto end;
|
||||
ptr_char = utf8_next_char (range);
|
||||
if (!ptr_char || !ptr_char[0] || (ptr_char[0] != '-'))
|
||||
goto end;
|
||||
|
||||
/* next char is the char2 */
|
||||
if (!range[0])
|
||||
goto end;
|
||||
ptr_char = utf8_next_char (ptr_char);
|
||||
if (!ptr_char || !ptr_char[0])
|
||||
goto end;
|
||||
@@ -894,7 +901,7 @@ eval_string_base_encode (const char *text)
|
||||
|
||||
ptr_string++;
|
||||
length = strlen (ptr_string);
|
||||
result = malloc ((length * 4) + 1);
|
||||
result = malloc ((length * 4) + 8 + 1);
|
||||
if (!result)
|
||||
goto end;
|
||||
|
||||
@@ -1572,7 +1579,8 @@ eval_syntax_highlight_colorize (const char *value)
|
||||
else if (ptr_value[0] == '-')
|
||||
color--;
|
||||
}
|
||||
ptr_value++;
|
||||
if (ptr_value[0])
|
||||
ptr_value++;
|
||||
if (config_num_eval_syntax_colors > 0)
|
||||
{
|
||||
string_dyn_concat (
|
||||
@@ -2524,11 +2532,9 @@ eval_replace_regex (const char *string, regex_t *regex, const char *replace,
|
||||
if (!string || !regex || !replace)
|
||||
goto end;
|
||||
|
||||
length = strlen (string) + 1;
|
||||
result = malloc (length);
|
||||
result = strdup (string);
|
||||
if (!result)
|
||||
goto end;
|
||||
snprintf (result, length, "%s", string);
|
||||
|
||||
eval_context->regex = &eval_regex;
|
||||
eval_context->regex_replacement_index = 1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2012-2025 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
* This file is part of WeeChat, the extensible chat client.
|
||||
*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user