-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pages/common/*: replace unportable shell syntax in command examples #12848
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Even though this is still WIP I have added some comments. I think that we should proceed very carefully to preserve the original meaning of the examples.
pages/common/sops.md
Outdated
@@ -29,4 +29,4 @@ | |||
|
|||
- Show the difference between two `sops` files: | |||
|
|||
`diff <(sops -d {{path/to/secret1.enc.yaml}}) <(sops -d {{path/to/secret2.enc.yaml}})` | |||
`diff {{path/to/sops_file1}} {{path/to/sops_file2}}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff doesn't work for encrypted files. The sops -d
command must be called to decrypt the sops files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would replacing the placeholder for {{decrypted_sops_file}}
cut it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion not, because decrypted sops files are just plain json or yaml files if I understand the docs of sops correctly.
Also, I do not think that we should eliminate process substitution from our examples. I highly doubt that any user uses a shell that doesn't support process substitution as their daily driver (no beginner user, anyway). I think that tldr pages remain more useful with the process substitution examples left in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion not, because decrypted sops files are just plain json or yaml files if I understand the docs of sops correctly.
Also, I do not think that we should eliminate process substitution from our examples. I highly doubt that any user uses a shell that doesn't support process substitution as their daily driver (no beginner user, anyway). I think that tldr pages remain more useful with the process substitution examples left in.
SOPS is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY formats [...]
from here
so the decrypted sops
file is in one of the formats above.
Co-authored-by: Juri Dispan <[email protected]>
Co-authored-by: spageektti <[email protected]>
…ple" This reverts commit 6e3c860.
This reverts commit ca77e49.
This reverts commit 5f0815b.
Is this PR ready to review or still WIP? |
The latter |
common
,linux
,osx
,windows
,sunos
,android
, etc.As proposed in #12694, I think the command examples of pages in the directory
common
mustshould adhere to the latest POSIX standard to have some degree of certainty that the commands will function properly in many shells.To find pages with unportable syntax, I used the following:
function
keywordIt is worth noting that the
grep
commands and the script are nowhere near foolproof, I encountered many false positives, especially about brace expansions. Therefore, there are probably more pages out there with unportable shell syntax.Footnotes
https://mywiki.wooledge.org/Bashism#Syntax ↩