Summary
Add a new --no-prefix option to bssh that disables the hostname prefix in command output. This is a prerequisite for pdsh compatibility mode (meta-issue #91).
Parent Issue
Part of #91 (pdsh compatibility mode) - Phase 1: New Options for Feature Parity
Background
By default, bssh prefixes each line of output with the hostname to identify which node produced it:
[node1] Linux node1 5.15.0
[node2] Linux node2 5.15.0
pdsh provides -N option to disable this prefix, which is useful when:
- Parsing output programmatically
- Output is already self-identifying
- Cleaner display for single-node operations
Proposed Implementation
CLI Interface
# Default behavior (with prefix)
bssh -H "node1,node2" "uname -a"
# Output:
# [node1] Linux node1 5.15.0
# [node2] Linux node2 5.15.0
# With --no-prefix
bssh -H "node1,node2" --no-prefix "uname -a"
# Output:
# Linux node1 5.15.0
# Linux node2 5.15.0
Option Definition
#[arg(
short = 'N',
long = "no-prefix",
help = "Disable hostname prefix in output lines\nUseful for programmatic parsing or cleaner display"
)]
pub no_prefix: bool,
Implementation Tasks
Acceptance Criteria
Notes
- Short option
-N does not conflict with existing bssh options
- Consider if this should also affect stderr output (probably yes)
Summary
Add a new
--no-prefixoption to bssh that disables the hostname prefix in command output. This is a prerequisite for pdsh compatibility mode (meta-issue #91).Parent Issue
Part of #91 (pdsh compatibility mode) - Phase 1: New Options for Feature Parity
Background
By default, bssh prefixes each line of output with the hostname to identify which node produced it:
pdsh provides
-Noption to disable this prefix, which is useful when:Proposed Implementation
CLI Interface
Option Definition
Implementation Tasks
--no-prefix/-Noption toClistruct insrc/cli.rssrc/ui.rsto respect this flagAcceptance Criteria
--no-prefixremoves[hostname]prefix from all output lines--stream)--output-dir) - file naming should still include hostnameNotes
-Ndoes not conflict with existing bssh options