1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00
Commit Graph

7207 Commits

Author SHA1 Message Date
Steffen Jaeckel
1c7bae4ae9 fix linter warnings
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-31 14:29:56 +02:00
Steffen Jaeckel
f284641710 less duplication
Print error message from `_string_matches_one_of()` instead of forming
an error message manually that contains the same entries that were checked
in `_string_matches_one_of()`.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-31 14:29:56 +02:00
Steffen Jaeckel
c53b78ea1c use _string_matches_one_of() at more places
I missed them the last time ...

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-31 10:33:14 +02:00
Paul Fertser
54c00e206d Make all existing input functions bindable from config 2022-03-30 23:00:14 +03:00
Paul Fertser
8ffa6f7452 Document custom input configuration in man page 2022-03-30 22:41:49 +03:00
Paul Fertser
4a6f88cc23 Add Alt/Ctrl-arrows combinations for GNU Screen
GNU Screen terminal emulator is modelled after VT100, its key bindings
for "application mode" (which profanity enables on startup) can be
seen with this: info screen "Input Translation".
2022-03-30 21:46:25 +03:00
Michael Vetter
9a4cfa70ef
Merge pull request #1666 from paulfertser/man-page-improvements
Man page improvements
2022-03-30 20:21:40 +02:00
Paul Fertser
66bd041617 Improve manpage formatting a bit 2022-03-30 21:01:40 +03:00
Paul Fertser
3478438df5 Add all missing key bindings to man page 2022-03-30 20:59:21 +03:00
Michael Vetter
14e6b9d227
Merge pull request #1665 from profanity-im/moar-cleanup
More cleanup
2022-03-30 19:35:14 +02:00
Steffen Jaeckel
eae795f478 fix installation of manpages
fixup of 46b9428d92

[0] writes something about "... use ‘man*section*_MANS’ over ‘man_MANS’ ..."
in the context of "fast installation", so I tried that and it worked.

TBH I don't really understand why this fixes the problem.

[0] https://www.gnu.org/software/automake/manual/html_node/Man-Pages.html

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Steffen Jaeckel
53a7689a58 update gitignore
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Steffen Jaeckel
67fa33ba4e add CI job to check coding style
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Steffen Jaeckel
2ca63d1d5f run make format
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Steffen Jaeckel
2995fbb953 add _string_matches_one_of() helper function
... instead of copying the same pattern over and over again.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Steffen Jaeckel
3a03496817 clean-up connection (act I)
* use custom memory descriptor that `abort()`s on `malloc()` failure
* use static log descriptor
* don't always re-create all contexts
* de-duplicate code of `.._connect()` and `.._register()`

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Paul Fertser
3b40da854d Tab completion code simplification
Factor out common code for Tab and Shift-Tab in a separate function.

No functional change.
2022-03-30 16:36:10 +03:00
Michael Vetter
7301c99676 Start new cycle 2022-03-30 14:08:49 +02:00
Michael Vetter
9214b0a10a Release 0.12.0 2022-03-30 14:08:49 +02:00
Michael Vetter
b5a6074b31
Merge pull request #1660 from paulfertser/fix-invalid-mbrlen-input
Input window: handle invalid multibyte
2022-03-29 13:03:28 +02:00
Paul Fertser
1e81eea899 Input window: handle invalid multibyte
The current code enters an infinite loop if the input string happens
to get an invalid utf-8 sequence somehow. For me it was reproducible
by running profanity in a Screen session and pressing Alt-т (cyrillic
letter).

Fix it the way borrowed from 0501e49623
where mbrlen is used for the same purposes.
2022-03-29 13:57:07 +03:00
Michael Vetter
3ee3d78af5 changelog: add build requirements info 2022-03-29 12:20:10 +02:00
Michael Vetter
b04a68462c Update Changelog for 0.12.0 2022-03-29 12:13:24 +02:00
Michael Vetter
abfab2aff7
Merge pull request #1659 from paulfertser/add-debug-info
Add debug information to binary
2022-03-29 11:15:29 +02:00
Michael Vetter
92f1ba47df
Merge pull request #1656 from MarcoPolo-PasTonMolo/feature/who-none
Add none option for /who
2022-03-29 01:28:58 +02:00
Paul Fertser
ca782b5385 Add debug information to binary
Option -ggdb3 (same as -g3) doesn't affect code-generation, just adds
to the binary size of an executable. Automake strips installed
binaries automatically when "make install-strip" is run so enabling
this option permanently doesn't affect the end result while allowing
for hassle-free interactive debugging.

If one is running a stripped binary it's still possible to attach GDB
by process PID and then use "file /path/to/unstripped/profanity" to
get all symbols and lines data.
2022-03-28 16:37:07 +03:00
Michael Vetter
b9e811efb3
Merge pull request #1657 from paulfertser/autoconf-fixes
Autoconf fixes
2022-03-28 15:18:08 +02:00
Michael Vetter
d662c1b82e
Merge pull request #1658 from paulfertser/use-editor-env-variable
Use EDITOR environment variable
2022-03-27 21:09:27 +02:00
Paul Fertser
1272543237 Use EDITOR environment variable
When preferences do not specify a program to be used for /editor
command, try getting it from EDITOR (which POSIX.1-2017 calls one of
"variables that are frequently exported by widely used command
interpreters and applications"), fall back to "vim" if not set.
2022-03-27 21:48:45 +03:00
Paul Fertser
08212a839a Fix AM_CFLAGS assignments (including libstrophe flags)
Autoconf can pre-populate this variable with essential parameters so
it should be appended to rather than overridden.

While at it, don't miss to append CFLAGS for libstrope which is needed
if it's installed to a non-default location.
2022-03-27 20:49:19 +03:00
Paul Fertser
90ea2fabe6 Fix autoconf warning about AC_CANONICAL_TARGET ordering
AM_INIT_AUTOMAKE requires AC_ARG_PROGRAM so should go after
AC_CANONICAL_TARGET for proper program name mangling.

This fixes "AC_ARG_PROGRAM was called before AC_CANONICAL_TARGET"
warning as emitted by autoconf 2.69.
2022-03-27 20:40:27 +03:00
MarcoPolo-PasTonMolo
03f8db9658 Add none option for /who
Fixes https://github.com/profanity-im/profanity/issues/1425
`/who none` now displays all users in an muc without an affiliation
2022-03-27 16:06:29 +03:00
Michael Vetter
409268e2b6
Merge pull request #1655 from profanity-im/win-autocomplete
Reset url autocompletion after open/save
2022-03-24 20:30:40 +01:00
Michael Vetter
923af3ba38 Reset url autocompletion after open/save
I guess we should reset the position after we ran `/url open|save`.
So that next time `/url open <tab>` starts with the latest entry.

Fix https://github.com/profanity-im/profanity/issues/1654
2022-03-24 15:39:58 +01:00
Michael Vetter
39b276986b
Merge pull request #1653 from MarcoPolo-PasTonMolo/fix/editor-crash
Fix crash on /editor
2022-03-24 15:37:38 +01:00
MarcoPolo-PasTonMolo
ce152a82b4 Fix crash on /editor 2022-03-24 11:42:49 +02:00
Michael Vetter
2c7f52f81d
Merge pull request #1652 from profanity-im/fix-1624
Fix #1624
2022-03-23 13:02:01 +01:00
Steffen Jaeckel
3a86b8c29b apply tls.policy to cURL calls
In case the user decides to ignore the validity-state of certificates
we also have to configure libcurl accordingly.

`tls.policy` can be set via
```
/account set <account> tls trust
```

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-22 11:44:01 +01:00
Steffen Jaeckel
7f1f9787cb add profanity-specific CAfile
The profanity-internal mechanism to allow connecting to a server isn't
easily portable to cURL. Therefor introduce a profanity-specific CAfile
which is managed individually and will be configured in libcurl calls.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-22 11:44:01 +01:00
Steffen Jaeckel
b28ac09368 a tad more const-correctness
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-22 11:44:00 +01:00
Steffen Jaeckel
7c56eac154 also store PEM in TLSCertificate
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-22 11:34:23 +01:00
Michael Vetter
5ea7186c27
Merge pull request #1651 from MarcoPolo-PasTonMolo/feature/quote-autocomplete
Add quote autocompletion for previous messages
2022-03-21 17:00:33 +01:00
Steffen Jaeckel
44e65f3089 simplify code
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-21 14:33:30 +01:00
MarcoPolo-PasTonMolo
fb790a955b Use funcs available in all glib versions to replace \n in quotes 2022-03-21 14:52:17 +02:00
MarcoPolo-PasTonMolo
06ef6842e8 Add quote autocompletion for previous messages
Fixes https://github.com/profanity-im/profanity/issues/1649

Type `>` then press tab or shift tab to autocomplete previous messages,
then type your reply and send message.
Newlines are replaced with newline followed by `> `.
A newline is added at the end so that the user can immediately type a
message without manually adding a new line.
2022-03-21 13:46:50 +02:00
Michael Vetter
09e7f63c79 Add adhoc cmd autocompletion
Add tab completion for `/cmd`.
Complete the `list` and `exec` subcommands.

Didn't complete the `<jid>` part since I think it's usually used for
components and etc. Things that might not be in the roster.

Fix https://github.com/profanity-im/profanity/issues/1650
2022-03-21 10:35:07 +01:00
Michael Vetter
024694215d
Merge pull request #1644 from profanity-im/ox-polish
Improve OX user experience
2022-03-21 10:08:13 +01:00
Michael Vetter
963065775b
Merge pull request #1646 from MarcoPolo-PasTonMolo/fix/nick-autocomplete
Fix not autocompleting nicks with '/'
2022-03-21 10:06:29 +01:00
MarcoPolo-PasTonMolo
ffeb8c33f1 Reverse priority for nick vs cmd autocomplete 2022-03-21 00:12:12 +02:00
Michael Vetter
4e95641014
Merge pull request #1648 from profanity-im/refactor-editor
Refactor editor & some other parts
2022-03-14 16:02:09 +01:00