ubuntu tab 自动补全失效
2021/10/27 7:12:44
本文主要是介绍ubuntu tab 自动补全失效,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
现象
没有修改.bashrc文件,共用一台机器的小伙伴也没有对系统的bashrc文件的进行修改。tab的自动补全功能莫名其妙的失效。
使用tab自动补全时,显示如下内容(仅粘贴部分内容)
+ _init_completion + local exclude= flag outx errx inx OPTIND=1 + getopts n:e:o:i:s flag + COMPREPLY=() + local 'redir=@(?([0-9])<|?([0-9&])>?(>)|>&)' + _get_comp_words_by_ref -n '<>&' cur prev words cword + local exclude flag i OPTIND=1 + words=() + local cur cword words + upargs=() + upvars=() + local upargs upvars vcur vcword vprev vwords + getopts c:i:n:p:w: flag -n '<>&' cur prev words cword + case $flag in + exclude='<>&' + getopts c:i:n:p:w: flag -n '<>&' cur prev words cword + [[ 6 -ge 3 ]] + case ${!OPTIND} in + vcur=cur + let 'OPTIND += 1' + [[ 6 -ge 4 ]] + case ${!OPTIND} in + vprev=prev + let 'OPTIND += 1' + [[ 6 -ge 5 ]] + case ${!OPTIND} in + vwords=words + let 'OPTIND += 1' + [[ 6 -ge 6 ]] + case ${!OPTIND} in + vcword=cword + let 'OPTIND += 1' + [[ 6 -ge 7 ]] + __get_cword_at_cursor_by_ref '<>&' words cword cur + words=() + local cword words ...
问题测试
在网上搜索到使用命令env -i bash --noprofile --norc
, 进行测试,查看tab自动补全是否可以使用。
tab键可正常使用, env -i bash --norc
尝试使用该命令,tab自动补全已经可以正常使用。
解决办法
使用env -i bash
设置bash, tab补全功能可正常使用了
ps
使用的tmux开了多个终端,不知道是不是tmux的问题。
参考
[1] https://itectec.com/ubuntu/ubuntu-no-tab-completion-with-asterisk/
这篇关于ubuntu tab 自动补全失效的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-06-26结对编程到底难不难?答案在这里
- 2024-06-19《2023版Java工程师》课程升级公告
- 2024-06-15matplotlib作图不显示3D图,怎么办?
- 2024-06-1503-Loki 日志监控
- 2024-06-1504-让LLM理解知识 -Prompt
- 2024-06-05做软件测试需要懂代码吗?
- 2024-06-0514-ShardingSphere的分布式主键实现
- 2024-06-03为什么以及如何要进行架构设计权衡?
- 2024-05-31全网首发第二弹!软考2024年5月《软件设计师》真题+解析+答案!(11-20题)
- 2024-05-31全网首发!软考2024年5月《软件设计师》真题+解析+答案!(21-30题)