Bash 완료는 centos 7에서 매우 불완전합니다


14

을 사용하여 bash 완성을 설치했습니다 yum install --enablerepo=epel bash-completion. 기본 명령 (git & yum)에서 작동하지만 완성품의 많은 부분이 빠져 있습니다.

/etc/bash_completion.d내용은 다음과 같습니다.

bash_completion.d] $ ls
git iprutils redefine_filedir yum yummain.py yum-utils.bash

그러나 make (설치되어 있음)에 대한 bash_completion이 있고 훨씬 더 많은 것, 즉 샘플 출력 here 과 비교 합니다 .

누락 된 완료 스크립트를 얻으려면 어떻게해야합니까? (바람직하게 yum을 사용하므로 수동으로 업데이트 할 필요가 없습니다)

중요한 경우 : 탭 완성이 작동하지만 내 .bashrc에 아무것도 소싱하지 않습니다. 패키지를 설치 한 후 작동하기 시작했습니다.


업데이트 : bash 완료 버전을 확인한 후 @fduff가 제안한대로 다음을 보았습니다.

$ yum 목록 설치 | grep 완성
bash-completion.noarch 1 : 2.1-6.el7 @base

그러나 그것을 제거와 함께 EPEL 저장소에서 bash_completion를 설치 CentOS는 강요하려고 sudo yum install --enablerepo=epel bash-completion --disablerepo=base굴복 package not found.

또한 것을 굴복 확인 새 패키지 완료 파일로 @Base 풋에 지금 /usr/share/bash-completion/completions, 그러나 나는 아직도 일부, 즉 실종 sshsudo(종류의 그 짜증 sudo command [tab]완료되지 동안은하지 command [tab]않습니다), 또한 나는에 대한 비트를 찾을 수 없습니다 sitll make(에있는 대상을 나열해야 함 Makefile)


UPDATE2 : 변경 로그 상태 :

  • 2013 년 11 월 1 일 금요일 Petr Stodulka-2.1-6
    • "tar"없이 사용 가능한 완성품 (# 810343-주석 15) 만 설치하고 다른 것을 제거하십시오.
  • 2013 년 9 월 13 일 금요일 Roman Rakus-2.1-5
    • 하나 이상의 누락 된 조건부 해결이 추가되었습니다. # 1007839
  • 2013 년 9 월 13 일 금요일 Roman Rakus-2.1-4
    • 일부 명령에 완료를 추가하지 않도록 조건을 추가했습니다. 패키지는 자체 완성이 있습니다. 해결 : # 1007839

따라서 bash_completion을 설치 한 후 sudo를 다시 설치하면 sudo완료에 도움이되었지만 make와 같은 행운은 없었습니다.

질문 : makeCentos 7에서 bash 완료 를 활성화하는 방법은 무엇입니까?

답변:


10

시도해 볼 수 있습니다 bash-completion-extras. 현재는 아직 시험 중이지만 결국에는 석방 될 것입니다. 지금, 당신은 실행할 수 있어야합니다 :

yum --enablerepo=epel-testing install bash-completion-extras

bash-completion-extras를 얻으려면.


1
지금은 에펠입니다.
Vedran Šego

7

나는이 bash-completion내 CentOS는 시스템에 설치된 패키지를 기본적으로는 많은 응용 프로그램에 대한 지원을 많이 있어요.

만일을 위해서도 가지고 계신 버전을 확인하십시오.

$  yum list installed | grep completion
bash-completion.noarch                1:1.3-7.el6               @epel


$  repoquery --list bash-completion.noarch 
/etc/bash_completion
/etc/bash_completion.d
/etc/bash_completion.d/abook
/etc/bash_completion.d/ant
/etc/bash_completion.d/apt
/etc/bash_completion.d/aspell
/etc/bash_completion.d/autoconf
/etc/bash_completion.d/automake
/etc/bash_completion.d/autorpm
/etc/bash_completion.d/bash-builtins
/etc/bash_completion.d/bind-utils
/etc/bash_completion.d/bitkeeper
/etc/bash_completion.d/bittorrent
/etc/bash_completion.d/bluez
/etc/bash_completion.d/brctl
/etc/bash_completion.d/bzip2
/etc/bash_completion.d/cfengine
/etc/bash_completion.d/chkconfig
/etc/bash_completion.d/cksfv
/etc/bash_completion.d/clisp
/etc/bash_completion.d/configure
/etc/bash_completion.d/coreutils
/etc/bash_completion.d/cpan2dist
/etc/bash_completion.d/cpio
/etc/bash_completion.d/crontab
/etc/bash_completion.d/cryptsetup
/etc/bash_completion.d/cups
/etc/bash_completion.d/cvs
/etc/bash_completion.d/cvsps
/etc/bash_completion.d/dd
/etc/bash_completion.d/dhclient
/etc/bash_completion.d/dict
/etc/bash_completion.d/dpkg
/etc/bash_completion.d/dselect
/etc/bash_completion.d/dsniff
/etc/bash_completion.d/dvd+rw-tools
/etc/bash_completion.d/e2fsprogs
/etc/bash_completion.d/findutils
/etc/bash_completion.d/freeciv
/etc/bash_completion.d/freerdp
/etc/bash_completion.d/fuse
/etc/bash_completion.d/gcc
/etc/bash_completion.d/gcl
/etc/bash_completion.d/gdb
/etc/bash_completion.d/genisoimage
/etc/bash_completion.d/getent
/etc/bash_completion.d/gkrellm
/etc/bash_completion.d/gnatmake
/etc/bash_completion.d/gpg
/etc/bash_completion.d/gpg2
/etc/bash_completion.d/gzip
/etc/bash_completion.d/hping2
/etc/bash_completion.d/iconv
/etc/bash_completion.d/iftop
/etc/bash_completion.d/ifupdown
/etc/bash_completion.d/imagemagick
/etc/bash_completion.d/info
/etc/bash_completion.d/ipmitool
/etc/bash_completion.d/iproute2
/etc/bash_completion.d/ipsec
/etc/bash_completion.d/iptables
/etc/bash_completion.d/ipv6calc
/etc/bash_completion.d/isql
/etc/bash_completion.d/jar
/etc/bash_completion.d/java
/etc/bash_completion.d/k3b
/etc/bash_completion.d/ldapvi
/etc/bash_completion.d/lftp
/etc/bash_completion.d/lisp
/etc/bash_completion.d/lrzip
/etc/bash_completion.d/lsof
/etc/bash_completion.d/lvm
/etc/bash_completion.d/lzma
/etc/bash_completion.d/lzop
/etc/bash_completion.d/mailman
/etc/bash_completion.d/make
/etc/bash_completion.d/man
/etc/bash_completion.d/mc
/etc/bash_completion.d/mcrypt
/etc/bash_completion.d/mdadm
/etc/bash_completion.d/medusa
/etc/bash_completion.d/minicom
/etc/bash_completion.d/mkinitrd
/etc/bash_completion.d/module-init-tools
/etc/bash_completion.d/monodevelop
/etc/bash_completion.d/mplayer
/etc/bash_completion.d/msynctool
/etc/bash_completion.d/mtx
/etc/bash_completion.d/munin-node
/etc/bash_completion.d/mutt
/etc/bash_completion.d/mysqladmin
/etc/bash_completion.d/ncftp
/etc/bash_completion.d/net-tools
/etc/bash_completion.d/nmap
/etc/bash_completion.d/ntpdate
/etc/bash_completion.d/open-iscsi
/etc/bash_completion.d/openldap
/etc/bash_completion.d/openssl
/etc/bash_completion.d/perl
/etc/bash_completion.d/pine
/etc/bash_completion.d/pkg-config
/etc/bash_completion.d/plague-client
/etc/bash_completion.d/pm-utils
/etc/bash_completion.d/postfix
/etc/bash_completion.d/postgresql
/etc/bash_completion.d/povray
/etc/bash_completion.d/procps
/etc/bash_completion.d/python
/etc/bash_completion.d/qdbus
/etc/bash_completion.d/qemu
/etc/bash_completion.d/quota-tools
/etc/bash_completion.d/rcs
/etc/bash_completion.d/rdesktop
/etc/bash_completion.d/redefine_filedir
/etc/bash_completion.d/resolvconf
/etc/bash_completion.d/rfkill
/etc/bash_completion.d/ri
/etc/bash_completion.d/rpcdebug
/etc/bash_completion.d/rpm
/etc/bash_completion.d/rpmcheck
/etc/bash_completion.d/rrdtool
/etc/bash_completion.d/rsync
/etc/bash_completion.d/samba
/etc/bash_completion.d/sbcl
/etc/bash_completion.d/screen
/etc/bash_completion.d/service
/etc/bash_completion.d/sh
/etc/bash_completion.d/shadow
/etc/bash_completion.d/sitecopy
/etc/bash_completion.d/smartctl
/etc/bash_completion.d/snownews
/etc/bash_completion.d/sqlite3
/etc/bash_completion.d/ssh
/etc/bash_completion.d/sshfs
/etc/bash_completion.d/strace
/etc/bash_completion.d/svk
/etc/bash_completion.d/sysbench
/etc/bash_completion.d/tar
/etc/bash_completion.d/tcpdump
/etc/bash_completion.d/unace
/etc/bash_completion.d/unrar
/etc/bash_completion.d/util-linux
/etc/bash_completion.d/vncviewer
/etc/bash_completion.d/vpnc
/etc/bash_completion.d/wireless-tools
/etc/bash_completion.d/wodim
/etc/bash_completion.d/wol
/etc/bash_completion.d/wtf
/etc/bash_completion.d/wvdial
/etc/bash_completion.d/xm
/etc/bash_completion.d/xmllint
/etc/bash_completion.d/xmlwf
/etc/bash_completion.d/xmms
/etc/bash_completion.d/xorg-x11-server-utils
/etc/bash_completion.d/xsltproc
/etc/bash_completion.d/xz
/etc/bash_completion.d/yp-tools
/etc/bash_completion.d/yum-arch
/etc/profile.d/bash_completion.sh
/usr/share/bash-completion
/usr/share/bash-completion/abook
/usr/share/bash-completion/ant
/usr/share/bash-completion/apt
/usr/share/bash-completion/aspell
/usr/share/bash-completion/autoconf
/usr/share/bash-completion/automake
/usr/share/bash-completion/autorpm
/usr/share/bash-completion/bind-utils
/usr/share/bash-completion/bitkeeper
/usr/share/bash-completion/bittorrent
/usr/share/bash-completion/bluez
/usr/share/bash-completion/brctl
/usr/share/bash-completion/bzip2
/usr/share/bash-completion/cfengine
/usr/share/bash-completion/chkconfig
/usr/share/bash-completion/cksfv
/usr/share/bash-completion/clisp
/usr/share/bash-completion/cpan2dist
/usr/share/bash-completion/cpio
/usr/share/bash-completion/crontab
/usr/share/bash-completion/cryptsetup
/usr/share/bash-completion/cups
/usr/share/bash-completion/cvs
/usr/share/bash-completion/cvsps
/usr/share/bash-completion/dhclient
/usr/share/bash-completion/dict
/usr/share/bash-completion/dpkg
/usr/share/bash-completion/dselect
/usr/share/bash-completion/dsniff
/usr/share/bash-completion/dvd+rw-tools
/usr/share/bash-completion/e2fsprogs
/usr/share/bash-completion/findutils
/usr/share/bash-completion/freeciv
/usr/share/bash-completion/freerdp
/usr/share/bash-completion/fuse
/usr/share/bash-completion/gcc
/usr/share/bash-completion/gcl
/usr/share/bash-completion/gdb
/usr/share/bash-completion/genisoimage
/usr/share/bash-completion/gkrellm
/usr/share/bash-completion/gnatmake
/usr/share/bash-completion/gpg
/usr/share/bash-completion/gpg2
/usr/share/bash-completion/gzip
/usr/share/bash-completion/helpers
/usr/share/bash-completion/helpers/perl
/usr/share/bash-completion/hping2
/usr/share/bash-completion/iftop
/usr/share/bash-completion/imagemagick
/usr/share/bash-completion/info
/usr/share/bash-completion/ipmitool
/usr/share/bash-completion/iproute2
/usr/share/bash-completion/ipsec
/usr/share/bash-completion/iptables
/usr/share/bash-completion/ipv6calc
/usr/share/bash-completion/isql
/usr/share/bash-completion/jar
/usr/share/bash-completion/java
/usr/share/bash-completion/k3b
/usr/share/bash-completion/ldapvi
/usr/share/bash-completion/lftp
/usr/share/bash-completion/lisp
/usr/share/bash-completion/lrzip
/usr/share/bash-completion/lsof
/usr/share/bash-completion/lvm
/usr/share/bash-completion/lzma
/usr/share/bash-completion/lzop
/usr/share/bash-completion/mailman
/usr/share/bash-completion/make
/usr/share/bash-completion/man
/usr/share/bash-completion/mc
/usr/share/bash-completion/mcrypt
/usr/share/bash-completion/mdadm
/usr/share/bash-completion/medusa
/usr/share/bash-completion/minicom
/usr/share/bash-completion/mkinitrd
/usr/share/bash-completion/monodevelop
/usr/share/bash-completion/mplayer
/usr/share/bash-completion/msynctool
/usr/share/bash-completion/mtx
/usr/share/bash-completion/munin-node
/usr/share/bash-completion/mutt
/usr/share/bash-completion/mysqladmin
/usr/share/bash-completion/ncftp
/usr/share/bash-completion/net-tools
/usr/share/bash-completion/nmap
/usr/share/bash-completion/ntpdate
/usr/share/bash-completion/open-iscsi
/usr/share/bash-completion/openldap
/usr/share/bash-completion/openssl
/usr/share/bash-completion/perl
/usr/share/bash-completion/pine
/usr/share/bash-completion/pkg-config
/usr/share/bash-completion/plague-client
/usr/share/bash-completion/pm-utils
/usr/share/bash-completion/postfix
/usr/share/bash-completion/postgresql
/usr/share/bash-completion/povray
/usr/share/bash-completion/procps
/usr/share/bash-completion/python
/usr/share/bash-completion/qdbus
/usr/share/bash-completion/qemu
/usr/share/bash-completion/quota-tools
/usr/share/bash-completion/rcs
/usr/share/bash-completion/rdesktop
/usr/share/bash-completion/resolvconf
/usr/share/bash-completion/rfkill
/usr/share/bash-completion/ri
/usr/share/bash-completion/rpcdebug
/usr/share/bash-completion/rpmcheck
/usr/share/bash-completion/rrdtool
/usr/share/bash-completion/rsync
/usr/share/bash-completion/samba
/usr/share/bash-completion/sbcl
/usr/share/bash-completion/screen
/usr/share/bash-completion/shadow
/usr/share/bash-completion/sitecopy
/usr/share/bash-completion/smartctl
/usr/share/bash-completion/snownews
/usr/share/bash-completion/sqlite3
/usr/share/bash-completion/ssh
/usr/share/bash-completion/sshfs
/usr/share/bash-completion/strace
/usr/share/bash-completion/svk
/usr/share/bash-completion/sysbench
/usr/share/bash-completion/tar
/usr/share/bash-completion/tcpdump
/usr/share/bash-completion/unace
/usr/share/bash-completion/unrar
/usr/share/bash-completion/vncviewer
/usr/share/bash-completion/vpnc
/usr/share/bash-completion/wireless-tools
/usr/share/bash-completion/wodim
/usr/share/bash-completion/wol
/usr/share/bash-completion/wtf
/usr/share/bash-completion/wvdial
/usr/share/bash-completion/xm
/usr/share/bash-completion/xmllint
/usr/share/bash-completion/xmlwf
/usr/share/bash-completion/xmms
/usr/share/bash-completion/xorg-x11-server-utils
/usr/share/bash-completion/xsltproc
/usr/share/bash-completion/xz
/usr/share/bash-completion/yp-tools
/usr/share/bash-completion/yum-arch
/usr/share/doc/bash-completion-1.3
/usr/share/doc/bash-completion-1.3/AUTHORS
/usr/share/doc/bash-completion-1.3/CHANGES
/usr/share/doc/bash-completion-1.3/CHANGES.package.old
/usr/share/doc/bash-completion-1.3/COPYING
/usr/share/doc/bash-completion-1.3/README
/usr/share/doc/bash-completion-1.3/TODO

버전 확인을 위해 +1 (기본 저장소에서 최신 (?!) 버전을 얻음) 불행히도 bash-completionepel 저장소에서 찾을 수 없습니다 (업데이트 질문 참조). 더 이상의 아이디어가 있습니까?
ted

1

bash-completion에 문제가 생겼을 때이 질문을 보았습니다. 나는 여기에있는 정보에서 영감을 얻어 실험을했습니다. 해당 패키지의 완료가 누락 된 경우 먼저 패키지를 다시 설치해야합니다.

예를 들어,에 대한 완료를 잃었습니다 yum. bash-completion을 제거, 설치 및 재설치하려고 시도했지만 no /etc/bash_completion.d/또는 no 아래에 yum이 없었습니다 /usr/share/bash-completion/completions/. 그런 다음이 질문을보고 시도 yum reinstall yum했습니다 yum reinstall bash-completion. 그 후 나는 yum누워 있었다 /etc/bash_completion.d/.

그것은 make내 홈 서버에서도 효과가있었습니다.

이 경우 대상 패키지를 먼저 다시 설치 한 다음 bash-completion을 다시 설치해야합니다.


다른 사람들이 제안한 것을 시험해 보았습니다. 결국 패키지를 다시 설치하여 문제를 해결했습니다. 감사!
helvete

1

CentOS 7.5의 경우 epel Repo를 활성화하십시오 . 그런 다음 설치하십시오 bash-completion-extras.

yum install epel-release
yum install bash-completion-extras
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.