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