我从oh-my-zsh
转到starship
,我发现这个工具要好得多。
唯一困扰我的是,当我将URI粘贴到终端时,它们不会自动被引用。因此,mpv
或yt-dlp
不能对URI执行任何操作。
使用oh-my-zsh
,url-quote-magic
显然是不做任何事情就启用的。
现在我想让url-quote-magic
和starship
一起使用。如何将url-quote-magic
合并到starship
中?
brew search url-quote-magic
==> Downloading https://formulae.brew.sh/api/formula.json
######################################################################## 100.0%
Error: No formulae or casks found for "url-quote-magic".
zsh --version
zsh 5.8.1 (x86_64-apple-darwin22.0)
更新:
他们的自述文件的安装方法不起作用
yt-dlp https://www.youtube.com/watch?v=ii_lXjLFddA
zsh: no matches found: https://www.youtube.com/watch?v=ii_lXjLFddA
mpv https://www.youtube.com/watch?v=36YnV9STBqc
zsh: no matches found: https://www.youtube.com/watch?v=36YnV9STBqc
cat .zshrc
eval "$(starship init zsh)"
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic
发布于 2023-02-19 09:43:51
根据文献资料的说法,您只需要在zshrc中添加以下行:
autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic
(我在Linux系统上测试了它,它似乎对我有用。我既不使用我的飞船,也不使用星际飞船。)
如果启用了括号内的粘贴,则需要bracketed-paste-magic
:
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
https://unix.stackexchange.com/questions/736073
复制相似问题