v0.0.23: Configurator für alle Optionen, Regex-Kurznamen #31

Merged
Sebi merged 2 commits from feat/configure-all-options into main 2026-11-13 22:08:19 +00:00
Owner

Configurator

  • netssh configure öffnet nach den Instanzen ein Menü mit allen Bereichen: SSH defaults, SSH options (jump host, host key checking, target, address family, extra args, -o), SSH rules, Resolver & Cache (inkl. Cache-Datei), Shortcuts & Alias, Completion.
  • SSH-Optionen pro NetBox-Instanz einstellbar.
  • Fix: Erneutes configure hat globale SSH-Optionen, ssh.rules und completion.max_results aus der Config gelöscht.

Regex-Kurznamen

  • shortcuts.rewrites, z. B. ^([a-z]+)[0-9]+- → $1: fsn1-bx1.hoster.de → fsnbx1.
  • Gilt fürs Verbinden (Hosts im Cache), für Shell-Aliase und die Tab-Completion.
  • Regeln im Wizard bearbeitbar; netssh alias --test HOSTNAME zeigt Kurzname und Treffer.
  • Fix: Die Kurznamen-Suche lief nur mit domains/strip_hyphens, eine Config mit nur rewrites hat nie gegriffen.

Tests

go test ./... grün. Manuell mit dem Binary geprüft: Dry-Run, Completion, Aliase und Wizard per pty-Skript.

🤖 Generated with Claude Code

## Configurator - `netssh configure` öffnet nach den Instanzen ein Menü mit allen Bereichen: SSH defaults, SSH options (jump host, host key checking, target, address family, extra args, `-o`), SSH rules, Resolver & Cache (inkl. Cache-Datei), Shortcuts & Alias, Completion. - SSH-Optionen pro NetBox-Instanz einstellbar. - **Fix:** Erneutes `configure` hat globale SSH-Optionen, `ssh.rules` und `completion.max_results` aus der Config gelöscht. ## Regex-Kurznamen - `shortcuts.rewrites`, z. B. `^([a-z]+)[0-9]+-` → `$1`: `fsn1-bx1.hoster.de` → `fsnbx1`. - Gilt fürs Verbinden (Hosts im Cache), für Shell-Aliase und die Tab-Completion. - Regeln im Wizard bearbeitbar; `netssh alias --test HOSTNAME` zeigt Kurzname und Treffer. - **Fix:** Die Kurznamen-Suche lief nur mit `domains`/`strip_hyphens`, eine Config mit nur `rewrites` hat nie gegriffen. ## Tests `go test ./...` grün. Manuell mit dem Binary geprüft: Dry-Run, Completion, Aliase und Wizard per pty-Skript. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sebi added 2 commits 2026-11-13 21:44:37 +00:00
After the NetBox instances, netssh configure now opens a menu with all
sections: SSH defaults, global SSH options (jump host, host key
checking, target, address family, extra args, -o options), SSH rules,
resolver & cache (including the cache file), shortcuts & command alias,
and completion.max_results. SSH options can also be set per instance.

The wizard rebuilt the config from its own fields, so re-running it
dropped global SSH options, ssh.rules and completion.max_results from
the file. It now edits a copy of the loaded config, and save validates
SSH options and rules before writing.

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>
Sebi merged commit 6419fbb00d into main 2026-11-13 22:08:18 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Sebi/ssh-netbox-wrapper#31