Summary
After an SFTP file upload via the terminal screen, _injectFilePaths in terminal_screen.dart:4600 automatically types the remote file path into the active tmux pane via send-keys. This is the "path injection" feature — intended to let the user immediately use the uploaded file path in shell commands.
However, there is no way to disable this behavior entirely. The current settings only control:
filePathFormat (default {path}) — the template for the injected text
fileAutoEnter (default false) — whether to press Enter after injection
fileBracketedPaste (default false) — whether to use bracketed paste
All three assume injection is desired. A user who just wants to upload a file to the remote host without the filename appearing as keystrokes in their terminal has no option.
Proposed fix
Add a fileInjectPath boolean setting (default true for backward compatibility). When false, _injectFilePaths and _injectImagePath skip the send-keys/sshClient.write call entirely and only do the SFTP upload.
The FileTransferConfirmDialog and ImageTransferConfirmDialog should expose this toggle.
Related code
lib/screens/terminal/terminal_screen.dart:4600 — _injectFilePaths
lib/screens/terminal/terminal_screen.dart:4506 — _injectImagePath
lib/widgets/file_transfer_confirm_dialog.dart — file upload options dialog
lib/widgets/image_transfer_confirm_dialog.dart — image upload options dialog
lib/providers/settings_provider.dart — settings definitions
Summary
After an SFTP file upload via the terminal screen,
_injectFilePathsinterminal_screen.dart:4600automatically types the remote file path into the active tmux pane viasend-keys. This is the "path injection" feature — intended to let the user immediately use the uploaded file path in shell commands.However, there is no way to disable this behavior entirely. The current
settingsonly control:filePathFormat(default{path}) — the template for the injected textfileAutoEnter(defaultfalse) — whether to press Enter after injectionfileBracketedPaste(defaultfalse) — whether to use bracketed pasteAll three assume injection is desired. A user who just wants to upload a file to the remote host without the filename appearing as keystrokes in their terminal has no option.
Proposed fix
Add a
fileInjectPathboolean setting (defaulttruefor backward compatibility). Whenfalse,_injectFilePathsand_injectImagePathskip thesend-keys/sshClient.writecall entirely and only do the SFTP upload.The
FileTransferConfirmDialogandImageTransferConfirmDialogshould expose this toggle.Related code
lib/screens/terminal/terminal_screen.dart:4600—_injectFilePathslib/screens/terminal/terminal_screen.dart:4506—_injectImagePathlib/widgets/file_transfer_confirm_dialog.dart— file upload options dialoglib/widgets/image_transfer_confirm_dialog.dart— image upload options dialoglib/providers/settings_provider.dart— settings definitions