feat: add --remote-dir flag and use ssh alias as mount label
Update PKGBUILD version / update-pkgver (push) Successful in 3s

- New `-r` / `--remote-dir` flag to mount a specific remote subdirectory;
  empty default preserves prior home-dir behaviour.
- Validate the flag value via a dedicated `rxRemoteDir` allowlist before it
  reaches the sshfs argv.
- Use the ssh_config alias (not the resolved HostName) as the local
  mountpoint name and as the sshfs source. File managers now show the
  human-readable label instead of the raw IP.
- Validate `args[0]` against `rxHostUser` since it now flows into argv.
- Rename `verify_mount_dir` parameter `hostname -> name` and `mount_sshfs`
  first parameter `hostname -> alias` for clarity.
This commit is contained in:
2026-04-28 15:39:17 +02:00
parent d01a358f35
commit afb51f1d61
4 changed files with 90 additions and 10 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
Quickly mount remote systems via SSHFS based on your ssh_config
Static mount dir is currently `~/Servers/<Host>`
Static mount dir is currently `~/Servers/<Host>` (uses the ssh_config alias as label, not the resolved IP).
# Install
@@ -36,6 +36,7 @@ sshfsc <Host>
| ---- | ----------- |
| `-e` | open mountpoint in your editor |
| `-v` | verbose: print resolved ssh_config fields (HostName, User, Port, IdentityFile) |
| `-r`, `--remote-dir <path>` | remote directory to mount (default: remote home) |
By default only the resolved mount path is printed. Use `-v` for the full
ssh_config dump.