mirror of
https://github.com/containers/podman.git
synced 2025-10-19 04:03:23 +08:00
Merge pull request #22406 from evgeni/network-list
add `list` as an alias to list networks
This commit is contained in:
@ -22,6 +22,7 @@ var (
|
|||||||
networklistDescription = `List networks`
|
networklistDescription = `List networks`
|
||||||
networklistCommand = &cobra.Command{
|
networklistCommand = &cobra.Command{
|
||||||
Use: "ls [options]",
|
Use: "ls [options]",
|
||||||
|
Aliases: []string{"list"},
|
||||||
Args: validate.NoArgs,
|
Args: validate.NoArgs,
|
||||||
Short: "List networks",
|
Short: "List networks",
|
||||||
Long: networklistDescription,
|
Long: networklistDescription,
|
||||||
|
@ -10,6 +10,8 @@ load helpers.network
|
|||||||
heading="NETWORK *ID *NAME *DRIVER"
|
heading="NETWORK *ID *NAME *DRIVER"
|
||||||
run_podman network ls
|
run_podman network ls
|
||||||
assert "${lines[0]}" =~ "^$heading\$" "network ls header missing"
|
assert "${lines[0]}" =~ "^$heading\$" "network ls header missing"
|
||||||
|
run_podman network list
|
||||||
|
assert "${lines[0]}" =~ "^$heading\$" "network list header missing"
|
||||||
|
|
||||||
run_podman network ls --noheading
|
run_podman network ls --noheading
|
||||||
assert "$output" !~ "$heading" "network ls --noheading shows header anyway"
|
assert "$output" !~ "$heading" "network ls --noheading shows header anyway"
|
||||||
|
Reference in New Issue
Block a user