shell

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package shell provides shell integration and completion support.

This package embeds shell integration scripts that provide enhanced nssh functionality when sourced in the user's shell configuration.

Shell Integration Features

The integration scripts provide:

  • Subcommand routing: detects nssh subcommands vs hostnames
  • Shell history: adds successful connections to shell history
  • Atuin integration: records commands in Atuin if available
  • Visual feedback: arrow prefix for connection commands (-> nssh hostname)

Supported Shells

Scripts are provided for:

Installation

Shell integration is installed by "nssh self init", which:

  1. Copies the appropriate script to ~/.local/share/nssh/
  2. Adds a source line to the shell's rc file (.bashrc, .zshrc, or config.fish)

Script Location

The scripts are embedded via go:embed from the scripts/ subdirectory. At runtime they are written to $XDG_DATA_HOME/nssh/.

Index

Constants

This section is empty.

Variables

View Source
var BashZshIntegration string

BashZshIntegration contains the shell integration script for bash and zsh. This script provides: - Subcommand routing (detect host, ctx, etc. vs hostname) - Shell history integration (bash history -s, zsh print -s) - Atuin integration if available - Arrow output for connection commands (-> nssh hostname)

View Source
var FishIntegration string

FishIntegration contains the shell integration script for fish. This script provides the same features as BashZshIntegration but using fish shell syntax.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL