Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 壳的动态扩展_Linux_Shell_Emacs - Fatal编程技术网

Linux 壳的动态扩展

Linux 壳的动态扩展,linux,shell,emacs,Linux,Shell,Emacs,linux外壳上是否有类似emacs dabbrev expand的函数 首先给出一个定义: M-xdescribe-FUNCTION ENTERDABBREV-expandEnter 鉴于bash似乎最受Emacs的影响,首先查看这里会发现一些可能性: 默认情况下(或至少是我的系统),M-/已绑定到完整文件名: $ bind -l | grep / "\e/": complete-filename 你可以把它重新绑起来 "\e/": dabbrev-expand 在您的~/.inputr

linux外壳上是否有类似emacs dabbrev expand的函数

首先给出一个定义:

M-xdescribe-FUNCTION ENTERDABBREV-expandEnter

鉴于
bash
似乎最受Emacs的影响,首先查看这里会发现一些可能性:

默认情况下(或至少是我的系统),M-/已绑定到
完整文件名

$ bind -l | grep /
"\e/": complete-filename
你可以把它重新绑起来

"\e/": dabbrev-expand
在您的
~/.inputrc
/etc/inputrc

请注意,它似乎只完成了第一个单词(命令),而且只能从历史记录中完成,据我所知,不能从当前命令行完成


在zsh中,我在手册页中看不到任何可以做到这一点的内容,但通过找出适当的命令(),应该可以做到这一点。

另请参见:以不同的方式实现类似的功能。非常感谢!您知道如何调用像bash这样的emacs函数,这些函数不绑定到特定的键吗?
$ bind -l | grep /
"\e/": complete-filename
"\e/": dabbrev-expand