Add backtunnel-umount script, host key policy support, and extend TUI/CLI integration
Introduce `backtunnel-umount` as a portable unmount helper, preferring `fusermount3`, `fusermount`, or `umount`. Add `BACKTUNNEL_HOSTKEY_POLICY` for configurable host key handling in `backtunnel-share` and `backtunnel-access`. Update TUIs for remote folder prompts and mount point handling. Enhance bash completion for TUI commands with directory suggestions. Revamp terminal selection logic in `backtunnel-open-term` to prioritize modern emulators like wezterm. Extend tests with scaffolds for host key policy and unmount behavior. Update README with new scripts, workflows, features, and troubleshooting tips.
This commit is contained in:
@@ -241,4 +241,30 @@ _backtunnel_complete() {
|
||||
|
||||
# Register for both commands
|
||||
complete -F _backtunnel_complete backtunnel-share
|
||||
complete -F _backtunnel_complete backtunnel-access
|
||||
complete -F _backtunnel_complete backtunnel-access
|
||||
|
||||
# Minimal TUI completers: complete only the first positional as a directory
|
||||
_backtunnel_access_tui_complete() {
|
||||
local cur
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
if [[ ${COMP_CWORD} -eq 1 ]]; then
|
||||
compopt -o filenames 2>/dev/null
|
||||
mapfile -t COMPREPLY < <(compgen -d -- "$cur")
|
||||
else
|
||||
COMPREPLY=()
|
||||
fi
|
||||
}
|
||||
_backtunnel_share_tui_complete() {
|
||||
local cur
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
if [[ ${COMP_CWORD} -eq 1 ]]; then
|
||||
compopt -o filenames 2>/dev/null
|
||||
mapfile -t COMPREPLY < <(compgen -d -- "$cur")
|
||||
else
|
||||
COMPREPLY=()
|
||||
fi
|
||||
}
|
||||
|
||||
# Register TUI completion
|
||||
complete -F _backtunnel_access_tui_complete backtunnel-access-tui
|
||||
complete -F _backtunnel_share_tui_complete backtunnel-share-tui
|
||||
Reference in New Issue
Block a user