A TOML configuration file maps glob-style patterns on to commands. You could configure see to open any file matching the pattern

Textualize/textualize-see

submited by
Style Pass
2023-03-19 15:00:07

A TOML configuration file maps glob-style patterns on to commands. You could configure see to open any file matching the pattern "*.py" with rich-cli and "*.rs" files with bat, for example.

The configuration is flexible enough that see can run a different command depending on the directory. For instance you might want a different command to display .html files in a Django project (which are in reality template files), than elsewhere on your system.

Any additional arguments added after the path are forwarded to the command. In the following command --pager is not an option for see, so it will be forwarded to the command that opens the file.

Note that see will run commands for configured paths only. If there is no matching path then see will do nothing. See below for configuration.

Textual reads its configuration from ~/.see.toml (a TOML file). This file should consist of several tables which specify the action (e.g. "view") and a glob style pattern to match against.

Leave a Comment