Found by the new Docker test environment against a real NetBox 4.7:
- The interface_name strategy filtered IP addresses with interface_name
and vminterface_name, which NetBox ignores, so it returned the first
address of the host instead of the named interface's. Use the real
filters interface and vminterface; a missing interface (HTTP 400)
falls through to the next strategy.
- sftp and scp took instance-qualified hosts (prod/web01:/path) for
local paths, because a "/" comes before the ":". Such arguments are
remote when the prefix is a configured NetBox instance.
- Shell aliases of instance-qualified hosts ran the shortcut rules on
"instance/host", so anchored rewrite rules never matched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shortcuts.rewrites applies regex replacements after the domain suffix
is stripped, e.g. ^([a-z]+)[0-9]+- -> $1 turns fsn1-bx1.hoster.de into
fsnbx1. The shortcut works for connecting (cached hosts), shell
aliases, and Tab completion, where it is offered when the full name
does not match the typed text. Rules are editable in netssh configure,
and netssh alias --test HOSTNAME shows a name's shortcut and the cached
hosts it matches.
The shortcut lookup only ran when domains or strip_hyphens were set;
it now also runs for rewrite-only configurations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- **Shortcuts**: Add hostname normalization with domain stripping and hyphen folding. Include alias generation for cached hosts.
- **Shell Hook**: Automate 24h cache refresh trigger with shell startup hook. Add install/uninstall commands for bash, zsh, and fish.
- **Wizard**: Extend setup wizard to configure shortcuts (domains, hyphen stripping) and default SSH port.
- **Cache**: Add `GetByShortcut` for resolving hosts via normalized shortcuts. Implement `NeedsRefresh` / `SetRefreshed` logic for refresh timestamps.
- **Tests**: Comprehensive unit tests for shortcuts, hook installation, cache refresh, and alias generation.
- **Docs**: Update README with shortcuts, shell hook, and default SSH port configuration.