Selecting files, fast¶
Configuration¶
You can configure various aspects of the kitten’s operation by creating a
choose-files.conf
in your kitty config folder.
See below for the supported configuration directives.
Source code for choose_files¶
The source code for this kitten is available on GitHub.
Command Line Interface¶
kitten choose_files [options] [directory to start choosing files in]
Run the kitty terminal emulator. You can also specify the program to run inside kitty as normal arguments following the options. For example: kitty --hold sh -c “echo hello, world”
For comprehensive documentation for kitty, please see: https://sw.kovidgoyal.net/kitty/
Options¶
- --mode <MODE>¶
The type of object(s) to select Default:
file
Choices:dir
,dirs
,file
,files
,save-dir
,save-file
,save-files
- --file-filter <FILE_FILTER>¶
A list of filters to restrict the displayed files. Can be either mimetypes, or glob style patterns. Can be specified multiple times. The syntax is
type:expression:Descriptive Name
. For example:mime:image/png:Images
andmime:image/gif:Images
andglob:*.[tT][xX][Tt]:Text files
. Note that glob patterns are case-sensitive. The mimetype specification is treated as a glob expressions as well, so you can, for example, usemime:text/*
to match all text files. The first filter in the list will be applied by default. Use a filter such asglob:*:All
to match all files. Note that filtering only appies to files, not directories.
- --suggested-save-file-name <SUGGESTED_SAVE_FILE_NAME>¶
A suggested name when picking a save file.
- --suggested-save-file-path <SUGGESTED_SAVE_FILE_PATH>¶
Path to an existing file to use as the save file.
- --title <TITLE>¶
Window title to use for this chooser
- --override <OVERRIDE>, -o <OVERRIDE>¶
Override individual configuration options, can be specified multiple times. Syntax: name=value.
- --config <CONFIG>¶
Specify a path to the configuration file(s) to use. All configuration files are merged onto the builtin
choose-files.conf
, overriding the builtin values. This option can be specified multiple times to read multiple configuration files in sequence, which are merged. Use the special valueNONE
to not load any config file.If this option is not specified, config files are searched for in the order:
$XDG_CONFIG_HOME/kitty/choose-files.conf
,~/.config/kitty/choose-files.conf
,$XDG_CONFIG_DIRS/kitty/choose-files.conf
. The first one that exists is used as the config file.If the environment variable
KITTY_CONFIG_DIRECTORY
is specified, that directory is always used and the above searching does not happen.If
/etc/xdg/kitty/choose-files.conf
exists, it is merged before (i.e. with lower priority) than any user config files. It can be used to specify system-wide defaults for all users. You can use either-
or/dev/stdin
to read the config from STDIN.
- --write-output-to <WRITE_OUTPUT_TO>¶
Path to a file to which the output is written in addition to STDOUT.
- --output-format <OUTPUT_FORMAT>¶
The format in which to write the output. Default:
text
Choices:json
,text
- --write-pid-to <WRITE_PID_TO>¶
Path to a file to which to write the process ID (PID) of this process to.