[IMP] choose-files: allow selecting files and directories

Add a new mode `all` to select either a file or a directory.
This commit is contained in:
Mr7F
2026-07-03 20:42:38 +02:00
parent bb452f2066
commit b2edb4b12d
4 changed files with 22 additions and 2 deletions

View File

@@ -200,6 +200,8 @@ Detailed list of changes
- Fix superfluous margin visible to the left and right of the tab bar when :opt:`background_opacity` is less than one and the window width is not a multiple of the cell width (:iss:`10212`)
- choose-files kitten: Add an ``all`` mode to select either an existing file or directory (:iss:`10208`)
0.47.4 [2026-06-15]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -120,6 +120,16 @@ directory you can select a descendant directory by pressing :kbd:`Enter`, the
same as you would for selecting a file to open.
Selecting files or directories
--------------------------------
To select any existing path, whether it is a file or a directory, use
:option:`--mode <kitty +kitten choose_files --mode>`:code:`=all`. Press
:kbd:`Enter` to select the highlighted path. You can still use :kbd:`Tab` to
change into a highlighted directory and :kbd:`Ctrl+Enter` to select the
current directory itself.
Configuration
------------------------