[data/etc/bash_completion.d/sonic-clear] Issue: clear tab completion …#269
Merged
qiluo-msft merged 1 commit intosonic-net:masterfrom Jun 21, 2018
praveen-li:clear_tab_completion
Merged
[data/etc/bash_completion.d/sonic-clear] Issue: clear tab completion …#269qiluo-msft merged 1 commit intosonic-net:masterfrom praveen-li:clear_tab_completion
qiluo-msft merged 1 commit intosonic-net:masterfrom
praveen-li:clear_tab_completion
Conversation
…shows garbage value $ clear ^[[3;J^[[H^[[2J Changes : 1.) Have bash_completion function for sonic-clear command instead of clear command. 2.) Use the same completion function for clear[/usr/bin/clear] as well. 3.) Change name of _clear_completion to _sonic_clear_completion. 4.) Replace $1 with "sonic-clear" in _sonic_clear_completion, so that it can be reused for clear. Signed-off-by: Praveen Chaudhary <[email protected]>
qiluo-msft
approved these changes
Jun 21, 2018
jleveque
approved these changes
Jun 21, 2018
stepanblyschak
pushed a commit
to stepanblyschak/sonic-utilities
that referenced
this pull request
Apr 18, 2022
This PR adds the following commits in sonic-platform-common eb35c85[Credo][Ycable] Fix Credo firmware download API download_firmware flag (sonic-net#269) Signed-off-by: vaibhav-dahiya <[email protected]>
mihirpat1
pushed a commit
to mihirpat1/sonic-utilities
that referenced
this pull request
Sep 15, 2023
sonic-net#269) Signed-off-by: vaibhav-dahiya <[email protected]> Due to PR sonic-net#222 the download_firmware_status variable of download_firmware API was not cleaned up, due to which higher layer could sometimes see wrong values of firmware version. This PR addresses this issue. After calling a firmware download and not changing this variable admin@sonic:~$ show mux firmware version Ethernet0 { "version_nic_active": "N/A", "version_nic_inactive": "N/A", "version_nic_next": "N/A", "version_peer_active": "N/A", "version_peer_inactive": "N/A", "version_peer_next": "N/A", "version_self_active": "N/A", "version_self_inactive": "N/A", "version_self_next": "N/A" } after the change admin@sonic:~$ show mux firmware version Ethernet0 <versionX> { "version_nic_active": "1.0MS", "version_nic_inactive": "1.1MS", "version_nic_next": "1.0MS", "version_peer_active": "1.0MS", "version_peer_inactive": "1.1MS", "version_peer_next": "1.0MS", "version_self_active": "1.0MS", "version_self_inactive": "1.1MS", "version_self_next": "1.0MS" } Description Motivation and Context How Has This Been Tested? Tested on an Arista Device.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
a.) clear tab completion shows garbage value
b.) sonic-clear tab completion does not show correct options
$ clear ^[[3;J^[[H^[[2J
$ sonic-clear
acl-loader crm debug grub insserv psuutil show sonic_installer valgrind
config debconf docker initramfs-tools pfcwd sfputil sonic-clear undebug
Changes :
1.) Have bash_completion function for sonic-clear command instead of clear command.
2.) Use the same completion function for clear[/usr/bin/clear] as well.
3.) Change name of _clear_completion to _sonic_clear_completion.
4.) Replace $1 with "sonic-clear" in _sonic_clear_completion, so that it can be reused for clear.
Signed-off-by: Praveen Chaudhary [email protected]
- What I did
Fixed issue: clear tab completion shows garbage value
$ clear TAB-TAB ----> $ clear ^[[3;J^[[H^[[2J
- How I did it
Changes :
1.) Have bash_completion function for sonic-clear command instead of clear command.
2.) Use the same completion function for clear[/usr/bin/clear] as well.
3.) Change name of _clear_completion to _sonic_clear_completion.
4.) Replace $1 with "sonic-clear" in _sonic_clear_completion, so that it can be reused for clear.
- How to verify it
Tests:
1.) clear [Enter]
Clears Screen
2.) clear
$ clear
arp bgp counters fdb ip ipv6
3.) clear a
$ clear a
arp
4.) clear counters
$ clear counters
Permission Denied, Please run as root/sudo
5.) clear arp
$ clear arp
fe80::2a6f:7fff:feba:1cff dev eth0 lladdr 28:6f:7f:ba:1c:ff router used 259/319/70 probes 0 STALE
172.25.11.1 dev eth0 lladdr 28:6f:7f:ba:1c:ff ref 1 used 66/0/65 probes 1 REACHABLE
Round 1, deleting 2 entries
Flush is complete after 1 round
6.) $ sonic-clear
arp bgp counters fdb ip ipv6
7.) which clear
/usr/local/bin/clear
- Previous command output (if the output of a command-line utility has changed)
$ clear ^[[3;J^[[H^[[2J
$ sonic-clear
acl-loader crm debug grub insserv psuutil show sonic_installer valgrind
config debconf docker initramfs-tools pfcwd sfputil sonic-clear undebug
- New command output (if the output of a command-line utility has changed)
As per section 3.
-->