Expand description
Session management: writes --cwd-file on normal exit.
A subprocess cannot change its parent shell’s working directory. Trail’s
“shell continues in the directory currently displayed” behaviour requires a
shell-side wrapper function that reads the file Trail writes here and calls
cd on its contents.
On normal exit (q / Quit action) Trail calls write_cwd_file to
record state.cwd in the path supplied by --cwd-file. On cancellation
(Ctrl-c / Esc-driven quit) the function is not called, so the file is
never written and the shell wrapper falls back to the original directory.
Structs§
- Recent
Dirs - Persisted recent directories store.
Functions§
- write_
cwd_ file - Writes
cwdas a UTF-8 string tocwd_file_path.