User-facing behaviour: Navigation Dialogs → Jump to Path.
jump_to_path is a single-line prompt, not a list picker: XeFMApp.jump_to_path
(xefm/app.py) opens an InputDialog (show_input, see
Dialog System) titled Jump to Path,
anchored to the active pane’s region. Nothing is scanned; the only filesystem
calls are the ones the typed path itself needs.
(An earlier, TFM-era design scanned the current directory tree in the background and listed every subdirectory. It no longer exists.)
os.sep for a local pane, / for a URI — so a child name can be
typed at once. select_all=False keeps that text rather than selecting it.FilepathCompleter
(xefm/completion.py) rooted at the current directory, with
directories_only=False (a file is a valid target, #351) and the pane’s
show_hidden._resolve_jump_target(text, current) turns the text into a
Path:
path_schemes.is_uri: s3://, ssh://, any PATH_SCHEMES entry)
is taken as written;~ (followed by / or os.sep) is joined to Path.home();current;os.path.normpath-ed; a remote one is not, since
normpath would collapse scheme:// to scheme:/ (#318).exists() is false are rejected with a message in the dialog, which stays
open.is_dir() call decides: a directory is the destination; a
file sends the pane to its parent with the cursor on its name. Both go
through _go_to_dir, which leaves virtual (search-results) mode, clears the
selection, re-lists and lands the cursor.exists() and is_dir() run inside a local probe helper. A path scheme is
user-supplied code, and this prompt is the first place a typed URI reaches it;
whatever it raises is reported through report_user_failure (log + traceback)
instead of escaping the key handler and leaving Enter silently dead. During
validation the exception’s text also becomes the dialog’s error; during accept
the pane simply stays where it was.
test/test_jump_to_path.py — _resolve_jump_target for local, ~, relative,
whitespace and remote input, and the dialog flow (file target focuses the file,
directory target navigates, missing and empty input rejected, completion offers
files).