Skip to content

Commit

Permalink
docs: add status --diff to the docs
Browse files Browse the repository at this point in the history
Update the manpage and autocomplete files.
  • Loading branch information
daniloegea committed Feb 28, 2024
1 parent 2f61d84 commit 41b8a47
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
13 changes: 13 additions & 0 deletions doc/netplan-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ Currently, **`netplan status`** depends on `systemd-networkd` as a source of dat
`-a`, `--all`
: Show all interface data including inactive.

`--diff`
: Analyze and display differences between the current system configuration and interface definitions present in the YAML files.
The configuration analyzed includes IP addresses, routes, MAC addresses, DNS addresses and search domains and missing network interfaces.

`--diff-only`
: Same as `--diff` but omits all the information that is not a difference.

`--root-dir`
: Read YAML files from this root instead of `/`.

`--verbose`
: Show extra information.

`-f` *`FORMAT`*, `--format` *`FORMAT`*
: Output in machine-readable `json` or `yaml` format.

Expand Down
2 changes: 1 addition & 1 deletion netplan.completions
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ _netplan_completions() {
;;

'status'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_netplan_completions_filter "-h --help --debug -a --all -f --format $(ls /sys/class/net 2> /dev/null)")" -- "$cur" )
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_netplan_completions_filter "-h --help --debug -a --all --diff --diff-only --root-dir --verbose -f --format $(ls /sys/class/net 2> /dev/null)")" -- "$cur" )
;;

'apply'*)
Expand Down
4 changes: 4 additions & 0 deletions tools/completely.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ netplan status:
- --debug
- -a
- --all
- --diff
- --diff-only
- --root-dir
- --verbose
- -f
- --format
- $(ls /sys/class/net 2> /dev/null)
Expand Down

0 comments on commit 41b8a47

Please sign in to comment.