Skip to content

docs(cli): explain set input modes and newline handling - #607

Merged
Maxerns merged 2 commits into
getsotto:mainfrom
Mohamedajab:docs/set-input-help
Oct 24, 2026
Merged

Maxerns merged 2 commits into
getsotto:mainfrom
Mohamedajab:docs/set-input-help

Conversation

@Mohamedajab

Copy link
Copy Markdown
Contributor

Summary: Explain the hidden prompt, piped input and file input in sotto set --help.

Closes #596

Adds POSIX examples for the prompt, a complete file value and a synthetic printf pipeline. Explains that stdin preserves line endings and trailing newlines, is not dotenv import, and does not replace local setup or unlocking. Keeps the warning about credentials in shell history and adds process arguments to it.

Adds a focused Cli::command() help test. Input handling, storage and encryption are unchanged.

Validation:

  • Checked the wording against Command::Set, read_value() and the existing help-test pattern.

  • git diff --check passed.

  • Rust/Cargo is unavailable locally, so I have not run the Rust test, rustfmt, or rendered sotto set --help. This is a draft pending those checks and a readability check of the rendered help. No real secrets were used.

  • I signed off every commit (git commit -s / Developer Certificate of Origin).

Signed-off-by: Mohamed Ajab <mohamedajab8@gmail.com>
@Maxerns
Maxerns marked this pull request as ready for review October 24, 2026 21:05

@Maxerns Maxerns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, it covers #596 well. I checked the wording against read_value and the
Set path and it holds: no trimming on stdin, prompt by default, unlock still required, and
machine tokens genuinely do not apply here. I ran fmt, the new help test and the rendered set --help here and all is clean and readable.

@Maxerns
Maxerns merged commit ad966c9 into getsotto:main Oct 24, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI help: explain piped and file input for sotto set

2 participants