pgsty / pgsty/farrow

Require -- before a remote command in ssh/exec and deprecate the positional heuristic

Open
#11 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
1
Forks
0
Avg merge
3d 12h
Merged PRs (30d)
1

Description

Why

Since 0.1.1, farrow ssh metaa -- uptime is refused because the token before -- must be a known node. Without --, the first token is still treated as a node only when it names one, so farrow ssh metaa uptime runs metaa uptime on the control node. That is harmless in practice (command not found) but the grammar stays ambiguous, and the help text has to explain two rules.

Proposed shape

  • 0.1.x: when there is no -- and the first token is not a node, print once warning: treating "metaa" as a remote command; write farrow ssh [node] -- command.
  • 0.2: the grammar becomes farrow ssh [node] [-- command...] and farrow exec [node] -- command...; a non-node token before any command is a usage error (exit 2).

Acceptance

  • farrow ssh uptime warns in 0.1.x and exits 2 in 0.2; Use lines, README, and the site examples are updated together.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ssh and exec command parsers and their Use lines, then review the README and site examples for the existing invocation forms. Check how node detection, warnings, and exit status are currently handled. Done means the 0.1.x warning and 0.2 usage error match the proposed grammar, with all listed documentation updated together.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.