Blob


1 .\" Copyright (c) 2021, 2022, 2024 Omar Polo <op@omarpolo.com>
2 .\"
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
6 .\"
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .Dd $Mdocdate: February 23 2024$
15 .Dt TELESCOPE 1
16 .Os
17 .Sh NAME
18 .Nm telescope
19 .Nd multi-protocol browser
20 .Sh SYNOPSIS
21 .Nm
22 .Bk -words
23 .Op Fl hnSv
24 .Op Fl c Ar config
25 .Op Ar URL
26 .Ek
27 .Sh DESCRIPTION
28 .Nm
29 is a browser that supports the Finger, Gemini and Gopher protocols.
30 .Nm
31 features tabs, a minibuffer, interactive completions, bookmarks and
32 client certificates.
33 .Pp
34 The arguments are as follows:
35 .Bl -tag -width xxxxxxxxxxxxx
36 .It Fl c Ar config
37 Specify an alternative configuration file.
38 By default
39 .Pa ~/.config/telescope/config
40 is loaded.
41 .It Fl h , Fl -help
42 Display version, usage and exit.
43 .It Fl n
44 Configtest mode.
45 Only check the configuration file for validity.
46 .It Fl S , Fl -safe
47 .Dq Safe
48 .Pq or Dq sandbox
49 mode.
50 Prevent
51 .Nm
52 from writing files to the disk and to acquire the lock, allowing to
53 run multiple instances at the same time.
54 .Nm
55 still loads the session file and the custom about pages.
56 .It Fl v , Fl -version
57 Display version and exit.
58 .El
59 .Sh UI CONCEPTS
60 .Nm
61 interface is divided into four areas: the tabline, the body, the
62 modeline and the echoarea/minibuffer.
63 .Pp
64 The tabline is always at the top of the screen and displays the tabs
65 separated by a vertical line.
66 When there are more tabs than the size of the window allow to display,
67 the characters
68 .Sq \&<
69 or
70 .Sq \&>
71 are shown at the start/end of the tabline to indicate that there are
72 more tabs in that direction.
73 .Pp
74 The body occupies the majority of the visible area.
75 It contains the current page and optionally a side window.
76 .Pp
77 The modeline is the second to last row of the screen.
78 It shows some information about the page: a spinner when the page is
79 loading, the trust level, whether a client certificate is in use, a
80 warning indicator for faulty Gemini servers, document type, the
81 scroll offset and the URL.
82 When a client certificate is in use, a
83 .Sq C
84 character is showed.
85 Some Gemini servers have buggy TLS handling but some information might
86 still be available.
87 This information could be truncated.
88 In those circumstances, a
89 .Sq W
90 character is shown.
91 .Pp
92 The echoarea is usually the last line of the screen.
93 Messages are often showed there, and link addresses too.
94 The echoarea is also used to obtain input from the user.
95 When commands like
96 .Ic swiper
97 or
98 .Ic link-select
99 are invoked, the minibuffer area grows to show possible completions.
100 .Sh TOFU
101 .Nm
102 aims to use the
103 .Dq Trust, but Verify Pq where appropriate
104 approach for
105 TOFU
106 .Pq Dq Trust On First Use .
107 The idea is to define three level of verification for a certificate:
108 .Bl -tag -width 12m
109 .It untrusted
110 .Pq Sq \&!
111 the server fingerprint does not match the stored value.
112 .It trusted
113 .Pq Sq v
114 the server fingerprint matches the store one.
115 .It verified
116 .Pq Sq V
117 the fingerprint matches and has been verified out-of-band.
118 .El
119 .Pp
120 The trust level of the page is indicated in the modeline with the
121 indicated character.
122 .Pp
123 Most of the time the
124 .Dq trusted
125 level is enough, but where is appropriate users should be able to
126 verify out-of-band the certificate.
127 .Pp
128 At the moment, there is no built-in support for an out-of-band
129 verification though.
130 .Sh SUPPORTED PROTOCOLS
131 The following protocols are supported:
132 .Bl -tag -width gemini://
133 .It about:
134 About pages are
135 .Nm
136 internal page.
137 See about:about for a list of all these pages.
138 .It file://
139 File types know to
140 .Nm ,
141 such as .gmi, .gemini, .txt, .md, .markdown, .diff or .patch, can be
142 viewed inside the application.
143 Types of local files are detected solely based on the file extension.
144 On some systems, such as
145 .Ox ,
146 only files inside special directories
147 .Pq like Pa /tmp No or Pa ~/Downloads
148 are available.
149 .It finger://
150 Finger URLs are interpreted as follows:
151 .Bl -bullet -compact
152 .It
153 the host is determined by the host name portion of the URL
154 .It
155 if the user portion of the URL is provided, it's interpreted as the
156 user to finger, otherwise the path component will be used
157 .El
158 thus
159 .Lk finger://user@hostname
160 and
161 .Lk finger://hostname/user
162 are treated as the same URL.
163 .It gemini://
164 Gemini is fully supported.
165 .It gopher://
166 Gopher support is limited to items type 0, 1 and 7.
167 All text is assumed to be encoded in UTF-8 (superset of ASCII).
168 .El
169 .Pp
170 User-entered URLs, given as argument on the command line or entered
171 with
172 .Ic load-url ,
173 by default are interpreted with a simple heuristic:
174 .Bl -bullet -compact
175 .It
176 if it's a proper absolute URL then use it as-is,
177 .It
178 if it starts with
179 .Dq ./
180 or
181 .Dq /
182 assume it's a file:// URL,
183 .It
184 otherwise treat it like a hostname with protocol
185 .Ic default-protocol
186 .Pq gemini by default .
187 .El
188 .Pp
189 The setting
190 .Ic load-url-use-heuristic
191 can be used to disable the use of heuristics.
192 .Sh MIME-TYPE HANDLING
193 Beyond the supported protocols which
194 .Nm
195 already understands, mime-types which
196 .Nm
197 cannot display can be opened using a
198 .Pa mailcap
199 file.
200 By default,
201 .Nm
202 will look for one of the following mailcap files in the following order:
203 .Pp
204 .Bl -tag -width Ds -compact
205 .It Pa ~/.mailcap
206 .It Pa /etc/mailcap
207 .It Pa /usr/etc/mailcap
208 .It Pa /usr/local/etc/mailcap
209 .El
210 .Pp
211 A default mailcap entry is always defined by
212 .Nm
213 which uses
214 .Xr xdg-open 1
215 as a fallback for mime-types not defined through a mailcap file, or if no
216 mailcap file was found.
217 .Pp
218 Refer to RFC 1524 for more information about the structure and format of this
219 file.
220 Note that
221 .Nm
222 currently only supports a small subset of this standard, honouring only the
223 .Pa needsterminal
224 and
225 .Pa copiousouput
226 flags.
227 .Sh CONFIGURATION FILE
228 During the startup,
229 .Nm
230 reads the configuration file at
231 .Pa ~/.config/telescope/config
232 or
233 .Pa ~/.telescope/config .
234 .Pp
235 It's possible to load a custom configuration file using the
236 .Fl c
237 flag.
238 .Pp
239 .Nm
240 will also load a file called
241 .Pa config-TERM ,
242 where
243 .Dq TERM
244 is the name of the terminal type
245 .Pq i.e. the TERM environment variable ,
246 if it exists.
247 .Pp
248 The format of the configuration file is fairly flexible.
249 The current line can be extended over multiple ones using a
250 backslash
251 .Pq Sq \e .
252 Comments can be put anywhere in the file using a hash mark
253 .Pq Sq # ,
254 and extend to the end of the current line, but backslashes can't be
255 used to extend comments over multiple lines.
256 .Pp
257 The following constructs are available:
258 .Bl -tag -width Ds
259 .It Ic bind Ar map Ar key Ar cmd
260 Bind
261 .Ar key
262 to the function
263 .Ar cmd
264 in the keymap
265 .Ar map .
266 Valid values for map are
267 .Dq global-map
268 .Pq i.e. when the user is viewing a page
269 and
270 .Dq minibuffer-map
271 .Pq i.e. when the minibuffer has the focus.
272 .Ar key
273 follows the same syntax described in
274 .Sx DEFAULT KEY BINDINGS
275 and all the possible functions are listed in
276 .Sx INTERACTIVE COMMANDS .
277 .It Ic proxy Ar proto Ic via Ar url
278 Use
279 .Ar url
280 as proxy for all URLs with
281 protocol
282 .Ar proto .
283 .Ar url
284 must be a Gemini URI without path, query and fragment component.
285 .It Ic set Ar opt No = Ar val
286 Set the option
287 .Ar opt
288 to the value
289 .Ar val .
290 Valid options are:
291 .Pp
292 .Bl -tag -width twelveletters -compact
293 .It Ic autosave
294 .Pq integer
295 If greater than zero, save the session after the specified amount of
296 seconds after some events happened
297 .Pq new or closed tabs, visited a link ...
298 Defaults to 20.
299 .It Ic default-protocol
300 .Pq string
301 The default protocol assumed for the
302 .Ic load-url
303 heuristic.
304 Defaults to
305 .Dq gemini .
306 .It Ic default-search-engine
307 .Pq string
308 URL of the preferred search engine, used by the
309 .Cm search
310 command.
311 If it's a Gemini URI, the user query will be appended as query,
312 replacing it if present.
313 If it's a Gopher URI, the user query will be sent as gopher search
314 parameter.
315 No other URI scheme are allowed.
316 .It Ic dont-wrap-pre
317 .Pq boolean
318 If true, don't wrap preformatted blocks.
319 Defaults to false.
320 .It Ic download-path
321 .Pq string
322 The default download path.
323 Defaults to
324 .Pa /tmp .
325 .It Ic emojify-link
326 .Pq boolean
327 If true, when the text of a link starts with an emoji followed by a
328 space, use that emoji as line prefix.
329 Defaults to true.
330 .It Ic enable-colors
331 .Pq boolean
332 If true, enable colours.
333 Defaults to false if
334 .Ev NO_COLORS
335 is set, true otherwise.
336 .It Ic fill-column
337 .Pq integer
338 If greater than zero, lines of text will be formatted in a way that
339 don't exceed the given number of columns.
340 Defaults to 80.
341 .It Ic fringe-ignore-offset
342 .Pq boolean
343 If true, the fringe doesn't obey to
344 .Ic olivetti-mode .
345 Defaults to false.
346 .It Ic hide-pre-blocks
347 .Pq boolean
348 If true, hide by default the body of the preformatted blocks.
349 Defaults to false.
350 .Ic push-button
351 can be used to toggle the visibility per-block.
352 .It Ic hide-pre-closing-line
353 .Pq boolean
354 If true, hide the closing line of preformatted blocks.
355 Defaults to false.
356 .It Ic hide-pre-context
357 .Pq boolean
358 If true, hide the start and end line of the preformatted blocks.
359 If both
360 .Ic hide-pre-context
361 and
362 .Ic hide-pre-blocks
363 are true, preformatted blocks are irremediably hidden.
364 Defaults to false.
365 .It Ic new-tab-url
366 .Pq string
367 URL for the new tab page.
368 Defaults to
369 .Dq about:new .
370 .It Ic load-url-use-heuristic
371 .Pq boolean
372 If false, don't use heuristics to resolve the URLs.
373 Non-absolute URLs given as command line argument will be resolved as
374 file system paths,
375 .Ic load-url
376 will resolve as relative to the current URL.
377 Defaults to true.
378 .It Ic max-killed-tabs
379 .Pq integer
380 The maximum number of closed tabs to keep track of, defaults to 10.
381 Must be a positive number; if zero, don't save closed tabs at all.
382 .It Ic olivetti-mode
383 .Pq boolean
384 If true, enable
385 .Ic olivetti-mode .
386 Defaults to true.
387 .It Ic tab-bar-show
388 .Pq integer
389 If tab-bar-show is -1 hide the tab bar permanently, if 0 show it
390 unconditionally.
391 If 1, show the bar only when there is more than one tab.
392 Defaults to 1.
393 .It Ic update-title
394 .Pq boolean
395 If true, set the terminal title to the page title.
396 Defaults to true.
397 .El
398 .It Ic style Ar name Ar option
399 Change the styling of the element identified by
400 .Ar name .
401 Multiple options may be specified within curly braces.
402 Valid style identifiers are:
403 .Bl -tag -width line.download.ongoing -compact -offset Ds
404 .It line
405 the area outside the lines in the body of the page.
406 .It line.compl
407 the completions.
408 .It line.compl.current
409 the current completion.
410 .It line.help
411 text in the *Help* buffer.
412 .It line.download.ongoing
413 an ongoing download
414 .It line.download.done
415 a completed download
416 .It line.download.info
417 informational text in the *Downloads* buffer.
418 .It line.fringe
419 .Pq virtual
420 lines draw after the end of a buffer.
421 .It line.text
422 text lines.
423 .It line.link
424 link lines.
425 .It line.title1..3
426 headings
427 .It line.item
428 item lines.
429 .It line.quote
430 quotes.
431 .It line.pre.start
432 the heading of a preformatted block.
433 .It line.pre
434 the content of a preformatted block.
435 .It line.pre.end
436 the closing line of a preformatted block.
437 .It download
438 the download pane
439 .It minibuffer
440 the minibuffer.
441 .It modeline
442 the modeline.
443 .It tabline
444 the tabline.
445 .It tabline.tab
446 the non-focused tabs.
447 .It tabline.current
448 the focused tab.
449 .El
450 .Pp
451 Valid options are:
452 .Bl -tag -width Ds
453 .It Ic attr Ar prefix Oo Ar line Oo Ar trail Oc Oc
454 Sets the text attributes.
455 If only one value is given,
456 .Ar line
457 and
458 .Ar trail
459 default to that; if two values are given then
460 .Ar trail
461 defaults to
462 .Ar prefix .
463 Each attribute is a comma-separated list of keywords:
464 .Bl -tag -width underline -compact -offset Ds
465 .It Ic normal
466 no attributes.
467 .It Ic standout
468 best highlighting mode for the terminal.
469 .It Ic underline
470 underlines the text.
471 .It Ic reverse
472 reverses background/foreground colors.
473 .It Ic blink
474 makes the text blinking.
475 .It Ic dim
476 half bright.
477 .It Ic bold
478 extra bright or bold.
479 .El
480 .Pp
481 Only the style identifiers with the
482 .Dq line.
483 prefix accept up to three attributes.
484 The other will only use the first one given.
485 .It Ic bg Ar prefix Oo Ar line Oo Ar trail Oc Oc
486 Sets the background color.
487 Follows the same behaviour as
488 .Ic attr
489 regarding the optional parameters.
490 The colour is one of black, red, green, yellow, blue,
491 magenta, cyan and white; colour0 to colour255
492 .Pq or color0 to color255
493 from the 256-colour set;
494 default for the default colour.
495 .It Ic fg Ar prefix Oo Ar line Oo Ar trail Oc Oc
496 Sets the foreground color.
497 It behaves just like
498 .Ic bg .
499 .It Ic prefix Ar prfx Op Ar cont
500 Sets the prefix for the current line type to
501 .Ar prfx
502 and
503 .Ar cont
504 as the prefix for the continuation lines
505 .Pq i.e. when a long line gets wrapped.
506 If
507 .Ar cont
508 is not given its value will be the same of
509 .Ar prfx .
510 .El
511 .El
512 .Sh DEFAULT KEY BINDINGS
513 The default key bindings are very similar to GNU Emacs, but care has
514 been taken to include also bindings familiar for
515 .Xr vi 1
516 and
517 .Dq CUA
518 users.
519 In the following examples, C-x means Control-x, M-x means Meta-x,
520 where the Meta key may be either a special key on the keyboard or the
521 ALT key; otherwise ESC followed by the key X works as well, and C-M-x
522 means to press the key X together with both Control and Meta.
523 .Pp
524 Keys are usually a single character, like
525 .Sq p
526 or
527 .Sq n ,
528 but some special keys are accepted as well.
529 .Pp
530 .Bl -tag -width 16m -offset indent -compact
531 .It <up>
532 Up arrow
533 .It <down>
534 Down arrow
535 .It <left>
536 Left arrow
537 .It <right>
538 Right arrow
539 .It <prior>
540 Previous page/Page up
541 .It <next>
542 Next page/Page down
543 .It <home>
544 Home
545 .It <end>
546 End
547 .It <f0> thru <f63>
548 Function keys
549 .It del or backspace
550 Backspace
551 .It esc
552 Escape
553 .It space or spc
554 Space
555 .It enter or ret
556 Enter
557 .It tab
558 Tab
559 .It backtab
560 Depends on the configuration of the terminal emulator; usually shift
561 tab.
562 .El
563 .Ss GNU Emacs-like keys
564 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
565 .It C-p
566 previous-line
567 .It C-n
568 next-line
569 .It C-f
570 forward-char
571 .It C-b
572 backward-char
573 .It M-{
574 backward-paragraph
575 .It M-}
576 forward-paragraph
577 .It C-a
578 move-beginning-of-line
579 .It C-e
580 move-end-of-line
581 .It M-v, M-space
582 scroll-up
583 .It C-v, space
584 scroll-down
585 .It M-<
586 beginning-of-buffer
587 .It M->
588 end-of-buffer
589 .It C-x C-c
590 kill-telescope
591 .It C-x C-w
592 write-buffer
593 .It C-g
594 clear-minibuf
595 .It M-x
596 execute-extended-command
597 .It C-c {
598 dec-fill-column
599 .It C-c }
600 inc-fill-column
601 .It C-c p
602 previous-heading
603 .It C-c n
604 next-heading
605 .It >
606 load-url
607 .It <
608 load-current-url
609 .It C-x C-f
610 load-url
611 .It C-x M-f
612 load-current-url
613 .It C-x o
614 other-window
615 .It C-x t 0
616 tab-close
617 .It C-x t 1
618 tab-close-other
619 .It C-x t 2
620 tab-new
621 .It C-x t o
622 tab-next
623 .It C-x t O
624 tab-previous
625 .It C-x t m
626 tab-move
627 .It C-x t M
628 tab-move-to
629 .It B, C-M-b
630 previous-page
631 .It F, C-M-f
632 next-page
633 .It <f7> a
634 bookmark-page
635 .It <f7> <f7>
636 list-bookmarks
637 .It C-z
638 suspend-telescope
639 .El
640 .Ss Xr vi 1 Ns -like keys
641 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
642 .It k
643 previous-line
644 .It j
645 next-line
646 .It l
647 forward-char
648 .It h
649 backward-char
650 .It {
651 backward-paragraph
652 .It }
653 forward-paragraph
654 .It ^
655 move-beginning-of-line
656 .It $
657 move-end-of-line
658 .It K
659 scroll-line-up
660 .It J
661 scroll-line-down
662 .It g g
663 beginning-of-buffer
664 .It G
665 end-of-buffer
666 .It g u
667 up
668 .It g r
669 root
670 .It g h
671 home
672 .It g D
673 tab-close
674 .It g N
675 tab-new
676 .It g t
677 tab-next
678 .It g T
679 tab-previous
680 .It g M-t
681 tab-move
682 .It g M-T
683 tab-move-to
684 .It H
685 previous-page
686 .It L
687 next-page
688 .It u
689 tab-undo-close
690 .It q
691 kill-telescope
692 .It ESC
693 clear-minibuf
694 .It :
695 execute-extended-command
696 .El
697 .Ss CUA-like keys
698 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
699 .It <up>
700 previous-line
701 .It <down>
702 next-line
703 .It <right>
704 forward-char
705 .It <left>
706 backward-char
707 .It <home>
708 move-beginning-of-line
709 .It <end>
710 move-end-of-line
711 .It <prior>
712 scroll-up
713 .It <next>
714 scroll-down
715 .It C-w
716 tab-close
717 .It C-t
718 tab-new
719 .It M-<prior>
720 tab-previous
721 .It M-<next>
722 tab-next
723 .It del
724 previous-page
725 .It M-<left>
726 previous-page
727 .It M-<right>
728 next-page
729 .It <f5>
730 reload-page
731 .It r
732 reload-page
733 .El
734 .Ss Neither Emacs nor vi specific
735 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
736 .It <f1>
737 toggle-help
738 .It enter
739 push-button
740 .It M-enter
741 push-button-new-tab
742 .It M-tab
743 previous-button
744 .It backtab
745 previous-button
746 .It tab
747 next-button
748 .It M-t
749 tab-select
750 .It \&[
751 tab-previous
752 .It \&]
753 tab-next
754 .It M-\&[
755 tab-move-to
756 .It M-\&]
757 tab-move
758 .It M-l
759 link-select
760 .It M-/
761 swiper
762 .It M-r
763 reply-last-input
764 .It s
765 search
766 .El
767 .Ss Minibuffer-specific keys
768 .Bl -tag -width xxxxxxxxxxxx -offset indent -compact
769 .It enter
770 mini-complete-and-exit
771 .It C-g
772 mini-abort
773 .It ESC
774 mini-abort
775 .It C-d
776 mini-delete-char
777 .It del
778 mini-delete-backward-char
779 .It backspace
780 mini-delete-backward-char
781 .It C-h
782 mini-delete-backward-char
783 .It C-x
784 mini-edit-external
785 .It C-b
786 backward-char
787 .It C-f
788 forward-char
789 .It <left>
790 backward-char
791 .It <right>
792 forward-char
793 .It C-e
794 move-end-of-line
795 .It C-a
796 move-beginning-of-line
797 .It <end>
798 move-end-of-line
799 .It <home>
800 move-beginning-of-line
801 .It C-k
802 mini-kill-line
803 .It C-u
804 mini-kill-whole-line
805 .It M-p
806 mini-previous-history-element
807 .It M-n
808 mini-next-history-element
809 .It C-p
810 previous-completion
811 .It C-n
812 next-completion
813 .It <up>
814 previous-completion
815 .It <down>
816 next-completion
817 .It tab
818 insert-current-candidate
819 .It M-<
820 mini-goto-beginning
821 .It M->
822 mini-goto-end
823 .El
824 .Sh INTERACTIVE COMMANDS
825 Follows the documentation for the interactive commands.
826 These commands can be bound to a key or executed with
827 .Ic execute-extended-command .
828 .Ss Movement commands
829 .Bl -tag -width execute-extended-command -compact
830 .It Ic backward-char
831 Move point one character backward.
832 .It Ic backward-paragraph
833 Move point one paragraph backward.
834 .It Ic beginning-of-buffer
835 Move point to the beginning of the buffer.
836 .It Ic end-of-buffer
837 Move point to the end of the buffer.
838 .It Ic forward-char
839 Move point one character forward.
840 .It Ic forward-paragraph
841 Move point one paragraph forward.
842 .It Ic insert-current-candidate
843 Copy the current selection text as minibuffer input.
844 .It Ic move-beginning-of-line
845 Move point at the beginning of the current (visual) line.
846 .It Ic move-end-of-line
847 Move point at the end of the current (visual) line.
848 .It Ic next-button
849 Move point to the next link.
850 .It Ic next-completion
851 Select the next completion.
852 .It Ic next-heading
853 Move point to the next heading.
854 .It Ic next-line
855 Move point to the next (visual) line, in the same column if possible.
856 .It Ic previous-button
857 Move point to the previous link.
858 .It Ic previous-completion
859 Select the previous completion.
860 .It Ic previous-heading
861 Move point to the previous heading.
862 .It Ic previous-line
863 Move point to the previous (visual) line.
864 .El
865 .Ss Bookmark-related commands
866 .Bl -tag -width execute-extended-command -compact
867 .It Ic bookmark-page
868 Save a page in the bookmark file.
869 It preloads the minibuffer with the current URL.
870 .It Ic list-bookmarks
871 Load the bookmarks page.
872 .El
873 .Ss Client certificate-related commands
874 .Bl -tag -width execute-extended-command -compact
875 .It Ic client-certificate-info
876 Show the active client certificate.
877 .It Ic unload-certificate
878 Forget the certificate on this page.
879 .It Ic use-certificate
880 Use a certificate for the current page.
881 .El
882 .Ss Tab-related commands
883 .Bl -tag -width execute-extended-command -compact
884 .It Ic tab-close
885 Close the current tab.
886 .It Ic tab-close-other
887 Close all tabs but the current one.
888 .It Ic tab-move
889 Move the current tab after the next one, wrapping around if
890 needed.
891 .It Ic tab-move-to
892 Move the current tab before the previous one, wrapping around if needed.
893 .It Ic tab-new
894 Open a new tab.
895 .It Ic tab-next
896 Focus next tab, wrapping around eventually.
897 .It Ic tab-previous
898 Focus the previous tab, wrapping around eventually.
899 .It Ic tab-select
900 Switch to a tab using the minibuffer.
901 .It Ic tab-undo-close
902 Re-open the most recently closed tab, if any.
903 .El
904 .Ss Misc commands
905 .Bl -tag -width execute-extended-command -compact
906 .It Ic cache-info
907 Show cache stats.
908 .It Ic clear-minibuf
909 Clear the echo area.
910 .It Ic dec-fill-column
911 Decrement fill-column by two.
912 .It Ic execute-extended-command
913 Execute an internal command.
914 .It Ic home
915 Go to the home directory.
916 The home directory is assumed to be the first path component in the
917 .Sy ~username
918 form.
919 If not found, loads the root directory.
920 .It Ic kill-telescope
921 Quit
922 .Nm .
923 .It Ic inc-fill-column
924 Increment fill-column by two.
925 .It Ic link-select
926 Select and visit a link using the minibuffer.
927 .It Ic load-current-url
928 Edit the current URL.
929 .It Ic load-url
930 Prompt for an URL.
931 Use the same heuristic as the URLs given as a command-line argument,
932 unless the
933 .Ic load-url-use-heuristic
934 option is unsed, in which case the URL is resolved using the current
935 one as base.
936 .It Ic next-page
937 Go forward in the page history.
938 .It Ic olivetti-mode
939 Toggle olivetti mode (i.e. horizontal centering of the lines of the
940 window.)
941 .It Ic other-window
942 Select the other window.
943 .It Ic previous-page
944 Go backward in the page history.
945 .It Ic push-button
946 Follow link at point, or toggle the visibility of the following
947 preformatted block if called when the cursor is on the heading of the block.
948 .It Ic push-button-new-tab
949 Follow link at point in a new tab.
950 .It Ic redraw
951 Redraw the screen, useful if some background program messed up the
952 display.
953 .It Ic reload-page
954 Reload the current page.
955 .It Ic reply-last-input
956 Reply the last input request.
957 .It Ic root
958 Go to the root directory.
959 .It Ic search
960 Search using the preferred search engine.
961 .It Ic scroll-down
962 Scroll down by one visual page.
963 .It Ic scroll-line-down
964 Scroll down by one line.
965 .It Ic scroll-line-up
966 Scroll up by one line.
967 .It Ic scroll-up
968 Scroll up by one visual page.
969 .It Ic suspend-telescope
970 Suspend the current
971 .Nm
972 session.
973 .It Ic swiper
974 Jump to a line using the minibuffer.
975 .It Ic toc
976 Jump to a heading using the minibuffer.
977 .It Ic toggle-help
978 Toggle side window with help about available keys and their associated
979 interactive command.
980 .It Ic toggle-pre-wrap
981 Toggle the wrapping of preformatted blocks.
982 .It Ic toggle-styling
983 Toggle the styling of the page.
984 This remains in effect until toggled again.
985 .It Ic up
986 Go up one level in the path hierarchy.
987 .It Ic write-buffer
988 Save the current buffer to the disk.
989 .El
990 .Ss Minibuffer commands
991 .Bl -tag -width execute-extended-command -compact
992 .It Ic mini-abort
993 Abort the current minibuffer action.
994 .It Ic mini-complete-and-exit
995 Complete the current minibuffer action.
996 .It Ic mini-delete-backward-char
997 Delete the character before the point.
998 .It Ic mini-delete-char
999 Delete the character after the point.
1000 .It Ic mini-edit-external
1001 Edit the minibuffer contents with an editor.
1002 .It Ic mini-goto-beginning
1003 Select the first completion, if any.
1004 .It Ic mini-goto-end
1005 Select the last completion, if any.
1006 .It Ic mini-kill-line
1007 Delete from point until the end of the line.
1008 .It Ic mini-kill-whole-line
1009 Delete the whole line.
1010 .It Ic mini-next-history-element
1011 Load the previous history element.
1012 .It Ic mini-previous-history-element
1013 Load the next history element.
1014 .El
1015 .Ss Aliases
1016 The following aliases are available during
1017 .Ic execute-extended-command :
1018 .Bl -tag -width 16m -compact
1019 .It Ic open
1020 .Ic load-url
1021 .It Ic tabn
1022 .Ic tab-next
1023 .It Ic tabnew
1024 .Ic tab-new
1025 .It Ic tabp
1026 .Ic tab-previous
1027 .It Ic q No and Ic wq
1028 .Ic kill-telescope
1029 .It Ic w
1030 .Ic write-buffer
1031 .El
1032 .Sh ENVIRONMENT
1033 When
1034 .Nm
1035 is started, it inspects the following environment variables:
1036 .Bl -tag -width NO_COLORS
1037 .It Ev HOME
1038 The user's login directory.
1039 .It Ev NO_COLORS
1040 To decide whether to use colors or not.
1041 The content of the variable doesn't matter.
1042 .It Ev TERM
1043 The user's terminal name.
1044 .It Ev VISUAL , Ev EDITOR
1045 The editor spawned by the
1046 .Ic mini-edit-external
1047 command.
1048 If not set,
1049 .Xr ed 1
1050 the standard text editor is used.
1051 .It Ev XDG_CACHE_HOME , Ev XDG_CONFIG_HOME , Ev XDG_DATA_HOME
1052 If defined can alter the default location of the files used.
1053 .El
1054 .Sh FILES
1055 By default
1056 .Nm
1057 follows the XDG Base Directory Specification.
1058 However, if
1059 .Pa ~/.telescope
1060 exists, XDG is ignored and all the files are stored inside it.
1061 The usage of
1062 .Ev XDG_CACHE_HOME ,
1063 .Ev XDG_CONFIG_HOME
1064 and
1065 .Ev XDG_DATA_HOME
1066 can further alter the location of these files.
1067 .Pp
1068 .Bl -tag -width Ds -compact
1069 .It Pa ~/.config/telescope/config
1070 Default configuration file.
1071 .It Pa ~/.config/telescope/certs.conf
1072 URLs to client certificate mappings.
1073 .It Pa ~/.local/share/telescope/pages/about_*.gmi
1074 Overrides for built-in about: pages.
1075 .It Pa ~/.local/share/telescope/bookmarks.gmi
1076 Bookmarks file.
1077 .It Pa ~/.local/share/telescope/certs/
1078 Directory where client certificates
1079 .Pq identities
1080 are stored.
1081 .It Pa ~/.local/share/telescope/known_hosts
1082 Hash of the certificates for all the known hosts.
1083 Each line contains three fields: hostname with optional port number,
1084 hash of the certificate and a numeric flag.
1085 .It Pa ~/.cache/telescope/lock
1086 Lock file used to prevent multiple instance of
1087 .Nm
1088 from running at the same time.
1089 .It Pa ~/.cache/telescope/session
1090 The list of tabs from the last session.
1091 .El
1092 .Sh EXAMPLES
1093 It's possible to browse
1094 .Dq the small web
1095 .Pq i.e. simple websites
1096 by using programs like the duckling-proxy by defining a proxy in
1097 .Pa ~/.config/telescope/config :
1098 .Bd -literal -offset indent
1099 proxy http via "gemini://127.0.0.1:1965"
1100 proxy https via "gemini://127.0.0.1:1965"
1101 .Ed
1102 .Pp
1103 To load
1104 .Nm
1105 without any configuration
1106 .Bd -literal -offset indent
1107 $ telescope -c /dev/null
1108 .Ed
1109 .Sh SEE ALSO
1110 .Xr telescope-identity 1
1111 .Xr xdg-open 1
1112 .Sh STANDARDS
1113 .Rs
1114 .%B XDG Base Directory Specification
1115 .%U https://specifications.freedesktop.org/basedir-spec/latest/
1116 .Re
1117 .Sh ACKNOWLEDGEMENTS
1118 The
1119 .Dq Trust, but verify (where appropriate)
1120 TOFU scheme was firstly suggested by thfr:
1121 .Lk gemini://thfr.info/gemini/modified-trust-verify.gmi .
1122 .Sh AUTHORS
1123 .An -nosplit
1124 The
1125 .Nm
1126 program was written by
1127 .An Omar Polo Aq Mt op@omarpolo.com .
1128 .Sh CAVEATS
1129 .Nm
1130 assumes a UTF-8 environment and doesn't try to cope with other encodings.
1131 This can cause strange rendering issues if you're lucky, or possibly
1132 weird thing happening depending on your locale and terminal emulator.
1133 .Sh BUGS
1134 There's no UI for out-of-band certificates validation.