# Completion, aliases, hook install for bash, zsh, fish, and the command alias. config <<'EOF' resolver: strategies: [management_subnet, primary_ip] management_subnets: [10.231.1.0/24] ssh: default_user: ops forwards: web: {local: "18081:127.0.0.1:8081"} shortcuts: domains: [.hoster.test] shell: alias: j EOF check "refresh" netssh cache refresh expect_out "complete hosts" "fsn/fsn1-pve2.hoster.test" netssh __complete fsn/fsn1 expect_out "complete scp host:" "fsn/fsn1-pve1.hoster.test:" netssh __complete scp a.txt fsn/fsn1-pve1 expect_out "complete forwards after the host" "web" netssh __complete tunnel fsn/fsn1-pve1.hoster.test "" expect_out "complete --forward" "web" netssh __complete --forward "" expect_out "fish aliases" "alias fsn_fsn1-pve1 " netssh alias --shell fish check "hook install bash" netssh hook install --shell bash # Interactive bash without a terminal warns about job control on stderr. expect_eq "bash loads host aliases" "fsn1-pve1" sh -c "bash -ic 'fsn_fsn1-pve1 hostname' 2>/dev/null /dev/null