Commit 333ccfd
Update bash completions for sonic-utilities commands (sonic-net#4163)
What I did
Update the bash completion files for all sonic-utilities commands to make them compatible with the current Click version.
Fixes sonic-net/sonic-buildimage#24594.
How I did it
Use Click's documentation to generate the bash completion script for each command that is packaged from sonic-utilities and uses Click.
How to verify it
Tested in KVM in Trixie image.
admin@vlab-01:~$ sonic-package-manager
install list manifests migrate repository reset show uninstall update
admin@vlab-01:~$ sonic-package-manager
install list manifests migrate repository reset show uninstall update
admin@vlab-01:~$ sonic-package-manager
install list manifests migrate repository reset show uninstall update
admin@vlab-01:~$ spm
install list manifests migrate repository reset show uninstall update
admin@vlab-01:~$ spm ^C
admin@vlab-01:~$ show
Display all 105 possibilities? (y or n)
aaa buffer_pool environment icmp macsec passw-hardening runningconfiguration suppress-fib-pending vlan
acl chassis event-counters interfaces management_interface pbh serial_console switch vnet
arp clock fabric ip mgmt-vrf pfc services switch-hash vrf
asic-sdk-health-event copp feature ipv6 mirror_session pfcwd sflow switch-trimming vrrp
auto-techsupport dhcp4relay-counters fg-nhg kdump mmu platform snmpagentaddress syslog vrrp6
auto-techsupport-feature dhcp6relay_counters fg-nhg-member kubernetes muxcable policer snmptrap system-health vxlan
banner dhcp_relay fg-nhg-prefix ldap nat priority-group spanning-tree system-memory warm_restart
bfd dhcp_server fgnhg ldap-server ndp processes srv6 tacacs watermark
bgp dhcprelay_helper flowcnt-route line ntp queue ssh techsupport ztp
bmp dns flowcnt-trap lldp nvgre-tunnel radius startupconfiguration uptime
boot dropcounters headroom-pool logging nvgre-tunnel-map reboot-cause storm-control users
buffer ecn history mac p4-table route-map subinterfaces version
admin@vlab-01:~$ config
aaa cbf dropcounters interface_naming_mode loopback nvgre-tunnel-map reload spanning-tree unique-ip
acl chassis ecn ipv6 macsec override-config-table replace ssh vlan
apply-patch checkpoint fabric kdump mclag passw-hardening rollback subinterface vnet
asic-sdk-health-event clock feature kubernetes member pbh route suppress-fib-pending vrf
auto-techsupport console fg-nhg ldap mirror_session pfcwd save switch-hash vxlan
auto-techsupport-feature delete-checkpoint fg-nhg-member ldap-server mmu platform serial_console switch-trimming warm_restart
banner dhcp_relay fg-nhg-prefix list-checkpoints muxcable portchannel sflow switchport watermark
bgp dhcp_server flowcnt-route load nat qos snmp synchronous_mode yang_config_validation
bmp dhcpv4_relay hostname load_mgmt_config ntp radius snmpagentaddress syslog ztp
buffer dns interface load_minigraph nvgre-tunnel rate snmptrap tacac
Note that these commands don't have a completion script generated, likely because an exception is being raised when just importing that module:
Cannot generate completion for counterpoll.main:cli!
Cannot generate completion for debug.main:cli!
Cannot generate completion for fwutil.main:cli!
Cannot generate completion for psuutil.main:cli!
Cannot generate completion for sfputil.main:cli!
Cannot generate completion for undebug.main:cli!
Signed-off-by: Ramesh Raghupathy <[email protected]>1 parent 6d107e0 commit 333ccfd
36 files changed
Lines changed: 216 additions & 253 deletions
File tree
- show
- sonic-utilities-data
- bash_completion.d
- debian
- tests
- watchdogutil
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
| 275 | + | |
275 | 276 | | |
276 | | - | |
| 277 | + | |
277 | 278 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments