加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – TAB Completon和mc问题

发布时间:2020-12-13 16:43:54 所属栏目:Linux 来源:网络整理
导读:DISTRIB_ID=UbuntuDISTRIB_RELEASE=8.10DISTRIB_CODENAME=intrepidDISTRIB_DESCRIPTION="Ubuntu 8.10" 这是服务器版本. 当我进入它时,我遇到以下问题: 问题1 选项卡完成表现得很奇怪到无法使用: cd ~/press TAB-sh: ( compgen -d -- '/home/dmitriid/' ):
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"

这是服务器版本.

当我进入它时,我遇到以下问题:

问题1

选项卡完成表现得很奇怪到无法使用:

> cd ~/<press TAB>
-sh: <( compgen -d -- '/home/dmitriid/' ): No such file or directory

> vi ~/.<press TAB>
<( compgen -d -- '/home/dmitriid/.' ): No such file or directory
-sh: <( eval compgen -f -X '*.@(o|so|so.!(conf)|a|rpm|gif|GIF|jp?(e)g|
JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' -- 
$(quote_readline $cur) ): No such file or directory

> nano ~/.<press TAB>
./              .bash_logout    .mc/            .viminfo
../             .bashrc         .mysql_history  
.aptitude/      .erlang.cookie  .profile        
.bash_history   .gitconfig      .ssh/

有办法解决这个问题吗?

问题2

我用了很多mc.我经常使用Ctrl O来隐藏面板并在shell中工作.就我而言:

> Ctrl O隐藏面板
>任何按键都会使面板恢复正常

有没有办法解决这个问题?

谢谢!

解决方法

好.事实证明,解决方案是愚蠢而简单的.关键是 – mc中没有交互式shell.

答案就在于:http://www.ibiblio.org/mc/FAQ

6.6 When I use Ctrl-O I don’t get a subshell. How do I fix this?

Only bash,tcsh and zsh can be used as subshell. Use one of those
shells as your default shell,and it will be used as subshell in GNU
Midnight Commander.

所以我决定改变shell:

> which bash
/bin/bash
> sudo chsh -s /bin/bash my_user_name
> grep ^my_user_name /etc/password
my_user_name:x:1002:1002::/home/my_user_name:/bin/bash

注意/ bin / bash在passwd文件的末尾.这意味着shell现在已经改变了.

我退出后再登录 – 瞧,一切正常!

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读