Watch: spaces in command are not preserved

Open
#135 0 comments 0 reactions 0 assignees View on GitHub

@cptaffe is already working on this.

Since Aug 28, 2025.

  • #136 by @cptaffe — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Start by locating the Watch command entry point and how it constructs the command passed back to rc. Reproduce the printf example from the issue, then verify that arguments containing whitespace remain single arguments and that the displayed output matches a direct rc invocation.

Written by the indexing model from the issue text.

Description

When invoking Watch with arguments which contain spaces, the arguments are not preserved. For example, this command works as expected in an rc session:

% printf '%s %s %s\n' 1 2 3
1 2 3

But when run through Watch:

Watch printf '%s %s %s\n' 1 2 3

We would expect the argument parsing rc does when invoking Watch to be preserved, however the first string is split again:

Image

To avoid this, Watch will need to quote any arguments with whitespace so that they are parsed correctly by rc again.

Dominant language
Go
Stars
377
Forks
109
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from 9fans/go

All issues in 9fans/go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.