-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
pdsh-compatpdsh compatibility mode featurespdsh compatibility mode featurespriority:mediumMedium priority issueMedium priority issuestatus:readyReady to be worked onReady to be worked ontype:enhancementNew feature or requestNew feature or request
Description
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.0Option 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
- Add
--no-prefix/-Noption toClistruct insrc/cli.rs - Modify output formatting in
src/ui.rsto respect this flag - Ensure it works with all output modes (stream, TUI, normal)
- Add unit tests
- Update help text and examples
Acceptance Criteria
-
--no-prefixremoves[hostname]prefix from all output lines - Works in stream mode (
--stream) - Works in normal output mode
- Works with output file mode (
--output-dir) - file naming should still include hostname - Does not affect TUI mode (TUI has its own display format)
Notes
- Short option
-Ndoes not conflict with existing bssh options - Consider if this should also affect stderr output (probably yes)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
pdsh-compatpdsh compatibility mode featurespdsh compatibility mode featurespriority:mediumMedium priority issueMedium priority issuestatus:readyReady to be worked onReady to be worked ontype:enhancementNew feature or requestNew feature or request