顺带问一句,可以想ielm一样,把prompt末端设置成行首吗?我喜欢C-a C-k 删命令,然后就把prompt也删掉了,搞得智能高亮也用不了,得用enter开新行,很不爽啊。
Aweshell 1.0 发布
casouri
#89
那两个补全的其实是两个东西。auto suggest 是根据历史,补全的是整条命令。并且只要有匹配就会一直显示,可以作为一个提示。比如我第一次查谷歌写了一条tar命令,第二次写的时候,我已经忘了之前是怎么写的了;有这个提示我就能很方便地看见我之前是怎么写的,不用再谷歌一遍。可以说提示作用大于补全作用。
另一个,company,就是单纯的补全,你按tab就根据命令或者pwd提供给你一些可选项。
可能用fish的 @twlz0ne 能解释地清楚一些
manateelazycat
#93
搞定了, 新版已经把 Fish 风格的补全建议和Bash/Zsh命令补全参数融为一体了: https://github.com/manateelazycat/aweshell/commit/489159923f66dfa57cda784783be644028f2ab6a
cireu
#102
系统: windows10 Emacs ver: 26.1
复现步骤:
-
emacs -Q
启动 - 手动导入路径
M-x toggle-debug-on-error
- 执行
(require 'company)
(require 'aweshell)
(eshell)
- 输入
git clone "
(我个人测试输入[
也会出现这个问题 - 反馈
Debugger entered--Lisp error: (no-catch pcompleted t)
throw(pcompleted t)
eshell-complete-parse-arguments()
pcomplete-parse-arguments(nil)
pcomplete-completions()
(let* ((most-similar (cl-find-if (function (lambda (str) (string-prefix-p prefix str))) (aweshell-parse-shell-history))) (command-prefix-args (mapconcat 'identity (nbutlast (split-string prefix)) " ")) (command-last-arg (car (last (split-string prefix)))) (completions (pcomplete-completions)) (shell-completions (if (consp completions) (remove-if-not (function (lambda (c) (string-prefix-p command-last-arg c))) completions) nil)) (suggest-completions (mapcar (function (lambda (c) (string-trim (concat command-prefix-args " " c)))) shell-completions))) (if most-similar (append (list most-similar) suggest-completions) suggest-completions))
aweshell-autosuggest-candidates("git clone \"")
(cond ((eql command 'interactive) (company-begin-backend 'aweshell-autosuggest)) ((eql command 'prefix) (and (eq major-mode 'eshell-mode) (aweshell-autosuggest--prefix))) ((eql command 'candidates) (aweshell-autosuggest-candidates arg)) ((eql command 'sorted) nil))
aweshell-autosuggest(candidates "git clone \"")
apply(aweshell-autosuggest (candidates "git clone \""))
company-call-backend-raw(candidates "git clone \"")
company--fetch-candidates("git clone \"")
company-calculate-candidates("git clone \"" nil)
company--begin-new()
company--perform()
company-auto-begin()
company-idle-begin(#<buffer Aweshell: c:/WINDOWS/system32/> #<window 3 on Aweshell: c:/WINDOWS/system32/> 103 102)
apply(company-idle-begin (#<buffer Aweshell: c:/WINDOWS/system32/> #<window 3 on Aweshell: c:/WINDOWS/system32/> 103 102))
timer-event-handler([t 23587 35613 891413 nil company-idle-begin (#<buffer Aweshell: c:/WINDOWS/system32/> #<window 3 on Aweshell: c:/WINDOWS/system32/> 103 102) nil 0])
随后每个输入都会被自动插入tab
guodongsoft
#104
我准备配置aweshell和fish,上图的右下部是我的fish的效果。
但是在前两行的开头部分有下面的多余信息。并且每次执行完命令也会显示这个信息
- “[]0;fish /home/guodong”
环境Ubuntu emacs26.1 mutli-term fish
求线索,我调查一下。