Skip to content

Commit

Permalink
Update docs for external diff program
Browse files Browse the repository at this point in the history
  • Loading branch information
timebertt committed Jun 3, 2024
1 parent 0f02849 commit 24e6e15
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ comparing revisions 2 and 3 of deployment.apps/nginx

The `k revisions diff` command uses `diff -u -N` to compare revisions by default.
It also respects the `KUBECTL_EXTERNAL_DIFF` environment variable like the `kubectl diff` command.
To get a nicer diff view, you can use one of these:
To get a nicer diff output, you can use one of these:

```bash
# Add color to the diff output
k revisions diff deploy nginx | colordiff
# Specify an external diff programm
KUBECTL_EXTERNAL_DIFF="colordiff -u" k revisions diff deploy nginx
# Use a colored external diff program
export KUBECTL_EXTERNAL_DIFF="colordiff -u"
# Use dyff as a rich diff program
export KUBECTL_EXTERNAL_DIFF="dyff between --omit-header"
# Show diff in VS Code
KUBECTL_EXTERNAL_DIFF="code --diff --wait" k revisions diff deploy nginx
export KUBECTL_EXTERNAL_DIFF="code --diff --wait"
```
8 changes: 4 additions & 4 deletions pkg/cmd/diff/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ files as empty) options.`,
# Compare the previous revision and the revision before that
kubectl revisions diff deploy nginx --revision=-2
# Add color to the diff output
kubectl revisions diff deploy nginx | colordiff
# Specify an external diff programm
# Use a colored external diff program
KUBECTL_EXTERNAL_DIFF="colordiff -u" kubectl revisions diff deploy nginx
# Use dyff as a rich diff program
KUBECTL_EXTERNAL_DIFF="dyff between --omit-header" kubectl revisions diff deploy nginx
# Show diff in VS Code
KUBECTL_EXTERNAL_DIFF="code --diff --wait" kubectl revisions diff deploy nginx
`,
Expand Down

0 comments on commit 24e6e15

Please sign in to comment.