Bash completions not working#25910
Closed
sarabjeetsingh1509 wants to merge 1 commit intosonic-net:masterfrom
Closed
Bash completions not working#25910sarabjeetsingh1509 wants to merge 1 commit intosonic-net:masterfrom
sarabjeetsingh1509 wants to merge 1 commit intosonic-net:masterfrom
Conversation
Signed-off-by: sarabjeets <[email protected]>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Author
|
@saiarcot895 Please review |
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.
Why I did it
Bash completions are not working
Issue
Fixes #24594
How I did it
The 2 current paths in bashrc, do not exist
root@sonic:/home/admin# ls -l /usr/share/bash-completion/bash_completion
ls: cannot access '/usr/share/bash-completion/bash_completion': No such file or directory
root@sonic:/home/admin# ls -l /etc/bash_completion
ls: cannot access '/etc/bash_completion': No such file or directory
root@sonic:/home/admin#
However, /etc/bash_completion.d/ exists.
root@sonic:/home/admin# ls -l /etc/bash_completion.d/
total 23
-rw-r--r-- 1 root root 695 Sep 17 2020 acl-loader
-rw-r--r-- 1 root root 671 Sep 17 2020 config
-rw-r--r-- 1 root root 677 Sep 17 2020 connect
-rw-r--r-- 1 root root 683 Sep 17 2020 consutil
-rw-r--r-- 1 root root 653 Sep 17 2020 crm
-rw-r--r-- 1 root root 659 Sep 17 2020 dump
-rw-r--r-- 1 root root 683 Sep 17 2020 pcieutil
-rw-r--r-- 1 root root 707 Sep 17 2020 pddf_fanutil
-rw-r--r-- 1 root root 707 Sep 17 2020 pddf_ledutil
-rw-r--r-- 1 root root 707 Sep 17 2020 pddf_psuutil
-rw-r--r-- 1 root root 731 Sep 17 2020 pddf_thermalutil
-rw-r--r-- 1 root root 653 Sep 17 2020 pfc
-rw-r--r-- 1 root root 665 Sep 17 2020 pfcwd
-rw-r--r-- 1 root root 665 Sep 17 2020 rexec
-rw-r--r-- 1 root root 671 Sep 17 2020 rshell
-rw-r--r-- 1 root root 659 Sep 17 2020 show
-rw-r--r-- 1 root root 701 Sep 17 2020 sonic-clear
-rw-r--r-- 1 root root 713 Sep 17 2020 sonic-cli-gen
-rw-r--r-- 1 root root 725 Sep 17 2020 sonic-installer
-rw-r--r-- 1 root root 725 Sep 17 2020 sonic_installer
-rw-r--r-- 1 root root 761 Sep 17 2020 sonic-package-manager
-rw-r--r-- 1 root root 653 Sep 17 2020 spm
-rw-r--r-- 1 root root 707 Sep 17 2020 watchdogutil
As a result, the bash autocompletion was not working. It was only working if /etc/bash_completion.d/* was sourced.
How to verify it
root@sonic:/home/admin# show i
icmp interfaces ip ipv6
root@sonic:/home/admin# config i
interface interface_naming_mode ipv6
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)