Skip to content

The command line

Introduction

The command line is used to enter URIs and commands. These are covered in here, but if you need help with what's available while you're using Rogallo, you can always request help by entering ? in the command line, or calling on the Help command (bound to F1 by default).

Command line help ⌂↻◀◀▶▶↑⇈◷★⇋v3.0.0 ✓gemini://localhost/features.gmi ┌─ Help ────────────────────────────────────────────────────────────────────────────────────────────────┐ ││ ││ Rogallo is a te││ey features include:│Rogallo v3.0.0│ ││ • Support for the││ • Bookmarks manag││ • Location histor│Command Line│ • Backward and fo││ • Copy-to-clipboa│Use this command line to enter filenames, directories, URLs or commands. Entering a filename or a│ • Configurable ho│URL will open that file for viewing; entering a directory will open a file opening dialog starting│ • Full mouse navi│at that location.│ • Built-in source││ • Context-sensiti│┌───────────────────────────────┬─────────┬─────────────────┬────────────────────────────────────┐│ • Command palette││Command│Aliases│Arguments│Description││ • Automatic hando│├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ • Optional render││!about_client_certificate│││Show information about the client││ • Local [Gemtext]│││││certificate used for the current││ • Built-in theme │││││page││ • Persistent conf│├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ • Fully responsiv││!about_this_page│││Show information about the current││ • Cross-platform │││││page││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!add_location_to_bookmarks│││Add the current location to the││ │││││bookmarks││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!backward│││Move backward through history││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!browse_trusted_hosts│││Browse the list of trusted hosts││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!clear_cache│││Clear the cache for all content││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!copy_document_to_clipboard│││Copy the current document to the││ │││││clipboard.││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!copy_location_to_clipboard│││Copy the current location to the││ │││││clipboard.││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!finger│!f│<user>[@<host>]│Perform user information lookups││ │││││with the finger protocol││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!forward│││Move forward through history││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!go_home│││Go to the home page││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!go_to_parent│││Go to the parent directory││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!go_to_root│││Go to the root directory││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!hand_off_to_operating_system│││Hand off the current location to││ │││││the operating system││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!help│?││Show the help screen││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!jump_to_command_line│││Jump to the command line││ │├───────────────────────────────┼─────────┼─────────────────┼────────────────────────────────────┤│ ││!jump_to_document│││Jump to the document viewer││ │───────────────────────────────────────────────────────────────────────────────────────────────────────│ │▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔│ │ Okay [Esc]│ │▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁│ └───────────────────────────────────────────────────────────────────────────────────────────────────────┘ text/gemini; charset=utf-8 >Enter a URI, file, or command  f1 Help  f2 History  f3 Bookmarks  ^[ Backward  ^] Forward  f10 Quit ▏^p Commands

URIs

If you wish to type in a location to visit, the command line is where you do this. What you type will depend on the protocol you're working with. Generally they will be:

  • Gemini: gemini://example.com/
  • Gopher: gopher://example.com/
  • Finger: finger://example.com/davep
  • Files: file:///path/to/file.txt

If an entered value isn't obviously a URI, and isn't a known command or alias, it is treated as follows:

  • If it is a path to an existing file in the local file system, that file will be turned into a URI and an attempt will be made to open it.
  • If it is a path to an existing directory in the local file system, that directory will be opened in a file-opening dialog, allowing you to browse for and select a file to view.
  • Otherwise, it will be turned into a gemini:// URL and will be processed as such.

So, in most cases, if you enter example.com, it will be opened as gemini://example.com/.

Commands

Commands start with a !. The commands include:

  • !about_client_certificate: Show information about the client certificate used for the current page
  • !about_this_page: Show information about the current page
  • !add_location_to_bookmarks: Add the current location to the bookmarks
  • !backward: Move backward through history
  • !browse_trusted_hosts: Browse the list of trusted hosts
  • !clear_cache: Clear the cache for all content
  • !copy_document_to_clipboard: Copy the current document to the clipboard.
  • !copy_location_to_clipboard: Copy the current location to the clipboard.
  • !finger: Perform user information lookups with the finger protocol
  • !forward: Move forward through history
  • !go_home: Go to the home page
  • !go_to_parent: Go to the parent directory
  • !go_to_root: Go to the root directory
  • !hand_off_to_operating_system: Hand off the current location to the operating system
  • !help: Show the help screen
  • !jump_to_command_line: Jump to the command line
  • !jump_to_document: Jump to the document viewer
  • !jump_to_side_panel: Jump to the side panel
  • !open_file: Open a file in the local filesystem
  • !pipe_document: Pipe the current document to an external command
  • !quit: Quit the application
  • !reload: Reload the current document
  • !save_source: Save the source of the current document to a file
  • !search_bookmarks: Search the bookmarks for a location
  • !search_history: Search the history for a location
  • !set_home_to_current_location: Set the home page to the current location
  • !set_home: Set the home page to a specific location
  • !theme: Change the application theme
  • !toggle_side_panel: Toggle the visibility of the side panel
  • !toggle_view: Toggle between rendered and source view of the document
  • !view_change_log: View the Rogallo ChangeLog

Aliases

Rogallo supports a simple form of aliases for its command line. Primarily they're useful for defining things such as performing searches using popular Gemini and Gopher search engines. Aliases are defined in a file called aliases.yaml, which is placed in the configuration directory.

The default version of the file looks like this:

fg: gopher://gopher.floodgap.com/1/v2/vs?{q}
gp: gemini://gemi.dev/cgi-bin/wp.cgi/search?{q}
ken: gemini://kennedy.gemi.dev/search?{q}
tlgs: gemini://tlgs.one/search?{q}

Aliases can include template variables ({q}, {qp}, {r}) that are dynamically replaced by any text typed after the alias name. For example, if you enter:

ken this is a test search

ken is matched as the alias, and the template variable in the alias definition is replaced using the trailing query string.

The available template variables are:

  • {q} - The URL-quoted query string (spaces become %20).
  • {qp} - The URL-quoted query string using pluses for spaces (spaces become +).
  • {r} - The raw, unquoted query string.

Given the example above, the template variables expand as follows:

  • {q} -> this%20is%20a%20test%20search
  • {qp} -> this+is+a+test+search
  • {r} -> this is a test search

While the default set of aliases all expand into URIs, which perform searches with search engines, this isn't the only application. For example, if you preferred to type whois rather than !finger to call on a finger server, you could have:

whois: "!finger {r}"

Tip

The aliases file is a YAML file. If you set up an alias and it doesn't seem to work in the way you hoped, try wrapping the right-hand side in quotes, as you can see in the whois example above.

History and completion

Rogallo's command line has a simple history system. As you type commands, they are recorded in the command line history and are kept available between sessions. You can use the Up and Down keys to navigate through the command history.

The command line also has a simple suggested completion system too. If you type in some text that is the start of a previously-entered input, or matches known commands, etc, a dimmed completion will be suggested. Press Right to accept the suggestion.

Showing a suggested completion ⌂↻◀◀▶▶↑⇈◷★⇋v3.0.0 ✓gemini://localhost/features.gmi Welcome to Rogallo Rogallo is a terminal-based client for browsing Geminispace, Spartanspace, Gopherspace, Nexspace, and Fingerspace. Its key features include: • Support for the `gemini`, `titan`, `spartan`, `gopher`, `nex`, and `finger`       protocols                                                                         • Bookmarks management with search                                                  • Location history tracking with search                                             • Backward and forward page navigation                                              • Copy-to-clipboard support for URIs or page content                                • Configurable home page                                                            • Full mouse navigation and interaction support                                     • Built-in source viewer                                                            • Context-sensitive help screens                                                    • Command palette for quick command discovery and execution                         • Automatic handoff of unknown MIME types to the operating system                   • Optional rendering (on by default) of ANSI escape sequences in pages              • Local [Gemtext](https://geminiprotocol.net/docs/gemtext-specification.gmi) file   viewing                                                                           • Built-in theme selection, plus support for user-supplied custom UI themes         • Persistent configuration across sessions                                          • Fully responsive layout that adjusts dynamically to terminal resizing             • Cross-platform support for macOS, GNU/Linux, Windows, and other operating systems running modern Python                                                             text/gemini; charset=utf-8 >gemini://astrobotany.mozz.us/  f1 Help  f2 History  f3 Bookmarks  ^[ Backward  ^] Forward  f10 Quit ▏^p Commands

Configuration

Input prompt

By default the input prompt in the command line is >. If you would prefer it's something else, you can configure this via general.yaml in the configuration directory. Suppose, instead, you wanted a nice colourful rocket:

command_line_prompt: "🚀"

resulting in:

Custom prompt ⌂↻◀◀▶▶↑⇈◷★⇋v3.0.0 ✓gemini://localhost/features.gmi Welcome to Rogallo Rogallo is a terminal-based client for browsing Geminispace, Spartanspace, Gopherspace, Nexspace, and Fingerspace. Its key features include: • Support for the `gemini`, `titan`, `spartan`, `gopher`, `nex`, and `finger` protocols                                                                  ▅ • Bookmarks management with search                                            • Location history tracking with search                                       • Backward and forward page navigation                                        • Copy-to-clipboard support for URIs or page content                          • Configurable home page                                                      • Full mouse navigation and interaction support                               text/gemini; charset=utf-8 🚀<=== Look at this cool new prompt!  f1 Help  f2 History  f3 Bookmarks  ^[ Backward  ^] Forward  f10 Qu▏^p Commands

Busy prompt

When Rogallo is loading a page the prompt turns into a small busy animation. By default it's the following string of characters:

⠁⠉⠘⠰⠤⠤⠆⠃⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏⠟⠿⠽⠾⠽⠿⠟⠯⠽⠾⠶⠦⠤⠤⠰⠘⠉⠁

Each character is a "cell" in the animation that is played. If you would prefer that the busy indication is something different, you can edit the busy_indicator_cells setting in general.yaml in the configuration directory. By default it will be an empty string, indicating that Rogallo should use its default animation.

Suppose you wanted the busy prompt to be the phases of the Moon, you could use:

busy_indicator_cells: "🌑🌒🌓🌔🌕🌖🌗🌘"

Location

By default, Rogallo's command line appears at the bottom of the screen, above the footer of the application. It can be moved to the top of the screen:

Rogallo with the command line on top >Enter a URI, file, or command ⌂↻◀◀▶▶↑⇈◷★⇋v3.0.0 ✓gemini://localhost/features.gmi Welcome to Rogallo Rogallo is a terminal-based client for browsing Geminispace, Spartanspace, Gopherspace, Nexspace, and Fingerspace. Its key features include: • Support for the `gemini`, `titan`, `spartan`, `gopher`, `nex`, and `finger` protocols  • Bookmarks management with search                                                       • Location history tracking with search                                                  • Backward and forward page navigation                                                   • Copy-to-clipboard support for URIs or page content                                     • Configurable home page                                                                 • Full mouse navigation and interaction support                                          • Built-in source viewer                                                                 • Context-sensitive help screens                                                         • Command palette for quick command discovery and execution                              • Automatic handoff of unknown MIME types to the operating system                        • Optional rendering (on by default) of ANSI escape sequences in pages                   • Local [Gemtext](https://geminiprotocol.net/docs/gemtext-specification.gmi) file        viewing                                                                                • Built-in theme selection, plus support for user-supplied custom UI themes              • Persistent configuration across sessions                                               • Fully responsive layout that adjusts dynamically to terminal resizing                  • Cross-platform support for macOS, GNU/Linux, Windows, and other operating systems      running modern Python                                                                  text/gemini; charset=utf-8  f1 Help  f2 History  f3 Bookmarks  ^[ Backward  ^] Forward  f10 Quit ▏^p Commands

The setting in general.yaml in the configuration directory is command_line_on_top, which takes true or false as valid values. It will be false (at the bottom) by default:

command_line_on_top: false

Available bindings

The following actions can have their bindings overridden:

  • command_line.history_previous - Move back through the command history
  • command_line.history_next - Move forward through the command history