about summary refs log tree commit diff stats
path: root/docs/profanity.1
blob: 8d5e793aee374cfe168eb6eae13f42236287508c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
.TH man 1 "2022-10-12" "0.13.1" "Profanity XMPP client"
.SH NAME
Profanity \- a simple console based XMPP chat client.
.SH SYNOPSIS
.B profanity
[\-vh] [\-l level] [\-a account]
.SH DESCRIPTION
.B Profanity
is a simple lightweight console based XMPP chat client. Its emphasis is
on having a simple and configurable command driven UI, see the homepage
at:
.br
.PP
<https://profanity-im.github.io>
.SH OPTIONS
.TP
.BI "\-v, \-\-version"
Show version and build information.
.TP
.BI "\-h, \-\-help"
Show help on command line arguments.
.TP
.BI "\-a, \-\-account "ACCOUNT
Auto connect to an account on startup,
.I ACCOUNT
must be an existing account.
.TP
.BI "\-c, \-\-config"
Use an alternative config file.
.TP
.BI "\-l, \-\-log "LEVEL
Set the logging level,
.I LEVEL
may be set to DEBUG, INFO (the default), WARN or ERROR.
.TP
.BI "\-f, \-\-logfile"
Specify a different logfile
.TP
.BI "\-t, \-\-theme "THEME
Specify which theme to use.
.I THEME
must be one of the themes installed in $XDG_CONFIG_HOME/profanity/themes
.SH KEYBINDINGS
.TP
.BR Tab , " Shift+Tab"
Tab completion next, previous.  Works for commands, nicks and
quotes (when input line starts with
.BR > ).
.TP
.BR ALT+1..Alt-0 " or " F1..F10
Choose window 1..10.
.TP
.BR ALT+q..Alt-p " (in QWERTY layout)"
Choose window 11..20.
.TP
.BI ALT+LEFT
Choose previous chat window.
.TP
.BI ALT+RIGHT
Choose next chat window.
.TP
.BI PAGEUP
Page the active window up.
.TP
.BI PAGEDOWN
Page the active window down.
.TP
.BI ALT+PAGEUP
Page the occupants or roster panel up.
.TP
.BI ALT+PAGEDOWN
Page the occupants or roster panel down.
.TP
.BI ALT+a
Jump to the next unread window.
.TP
.BI ALT+v
Mark current window for later reading with an attention flag.
.TP
.BI ALT+m
Switch between windows marked with the attention flag.
.TP
.BI ALT+c
Run external editor (see
.BR profanity-editor (1))
for current input line.
.TP
.BI CTRL+DOWN
Store current input line in history but do not execute it.
.PP
.I Note:
Profanity is using GNU Readline library to handle input so
default configuration file
.I ~/.inputrc
affects operation. In addition to that
.I $XDG_CONFIG_HOME/profanity/inputrc
is read after all default keybindigs are set so one can override
or add settings there. For reference, see Readline documentation:
.I "info readline ""Command Line Editing"" ""Readline Init File"" ""Readline Init File Syntax"""
and the list of available Profanity commands in
.IR inputwin.c .
Standard Readline keybindings are supported, including
.B C-r
for interactive history search and
.B C-x C-r
for reloading inputrc without restart.
.SH USING PROFANITY
The user guide can be found at <https://profanity-im.github.io/userguide.html>.
.SH SEE ALSO
.B Profanity
itself has a lot of built\-in help. Check the
.I /help
command for more information.  Type "/help help" for information
on how to use help itself.  Profanity ships with one man page for
each built-in command, e.g. there is
.BR profanity-account (1)
for
.IR /account .
.SH CONFIGURATION
Configuration for
.B Profanity
is stored in
.I $XDG_CONFIG_HOME/profanity/profrc
, details on commands for configuring Profanity can be found at <https://profanity-im.github.io/reference.html> or the respective built\-in help or man pages.
.SH BUGS
Bugs can either be reported by raising an issue at the Github issue tracker:
.br
.PP
<https://github.com/profanity-im/profanity/issues>
.br
.PP
or to the mailing list at:
.br
.PP
<https://lists.datenkollektiv.net/postorius/lists/profanity.lists.notraces.net>
.br
.SH LICENSE
Copyright (C) 2012 \- 2019 James Booth <boothj5web@gmail.com>.
Copyright (C) 2019 \- 2023 Michael Vetter <jubalh@iodoru.com>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH AUTHORS/CREDITS
.B Profanity
was created by James Booth
.B <boothj5web@gmail.com>
with many contributions from others, see the full list at: <https://github.com/profanity-im/profanity/graphs/contributors>


                                                              



                      
#include <glib.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>
#include <string.h>

#include <stabber.h>
#include <expect.h>

#include "proftest.h"

void
sends_new_item(void **state)
{
    prof_connect();

    stbbr_for_query("jabber:iq:roster",
        "<iq type='set' from='stabber@localhost'>"
            "<query xmlns='jabber:iq:roster'>"
                "<item jid='bob@localhost' subscription='none' name=''/>"
            "</query>"
        "</iq>"
    );

    prof_input("/roster add bob@localhost");

    assert_true(stbbr_received(
        "<iq type='set' id='*'>"
            "<query xmlns='jabber:iq:roster'>"
                "<item jid='bob@localhost' name=''/>"
            "</query>"
        "</iq>"
    ));

    assert_true(prof_output_exact("Roster item added: bob@localhost"));
}

void
sends_new_item_nick(void **state)
{
    prof_connect();

    stbbr_for_query("jabber:iq:roster",
        "<iq type='set' from='stabber@localhost'>"
            "<query xmlns='jabber:iq:roster'>"
                "<item jid='bob@localhost' subscription='none' name='Bobby'/>"
            "</query>"
        "</iq>"
    );

    prof_input("/roster add bob@localhost Bobby");

    assert_true(stbbr_received(
        "<iq type='set' id='*'>"
            "<query xmlns='jabber:iq:roster'>"
                "<item jid='bob@localhost' name='Bobby'/>"
            "</query>"
        "</iq>"
    ));

    assert_true(prof_output_exact("Roster item added: bob@localhost (Bobby)"));
}

void
sends_remove_item(void **state)
{
    prof_connect_with_roster(
        "<item jid='buddy1@localhost' subscription='both'/>"
        "<item jid='buddy2@localhost' subscription='both'/>"
    );

    stbbr_for_query("jabber:iq:roster",
        "<iq id='*' type='set'>"
            "<query xmlns='jabber:iq:roster'>"
                "<item jid='buddy1@localhost' subscription='remove'/>"
            "</query>"
        "</iq>"
    );

    prof_input("/roster remove buddy1@localhost");

    assert_true(stbbr_received(
        "<iq type='set' id='*'>"
            "<query xmlns='jabber:iq:roster'>"
                "<item jid='buddy1@localhost' subscription='remove'/>"
            "</query>"
        "</iq>"
    ));

    assert_true(prof_output_exact("Roster item removed: buddy1@localhost"));
}

void
sends_remove_item_nick(void **state)
{
    prof_connect_with_roster(
        "<item jid='buddy1@localhost' name='Bobby' subscription='both'/>"
        "<item jid='buddy2@localhost' subscription='both'/>"
    );

    stbbr_for_query("jabber:iq:roster",
        "<iq id='*' type='set'>"
            "<query xmlns='jabber:iq:roster'>"
                "<item jid='buddy1@localhost' subscription='remove'/>"
            "</query>"
        "</iq>"
    );

    prof_input("/roster remove Bobby");

    assert_true(stbbr_received(
        "<iq type='set' id='*'>"
            "<query xmlns='jabber:iq:roster'>"
                "<item jid='buddy1@localhost' subscription='remove'/>"
            "</query>"
        "</iq>"
    ));

    assert_true(prof_output_exact("Roster item removed: buddy1@localhost"));
}

void
sends_nick_change(void **state)
{
    prof_connect_with_roster(
        "<item jid='buddy1@localhost' subscription='both'/>"
    );

    prof_input("/roster nick buddy1@localhost Buddy1");

    assert_true(prof_output_exact("Nickname for buddy1@localhost set to: Buddy1."));

    assert_true(stbbr_received(
        "<iq type='set' id='*'>"
            "<query xmlns='jabber:iq:roster'>"
                "<item jid='buddy1@localhost' name='Buddy1'/>"
            "</query>"
        "</iq>"
    ));
}