[英]How to set iterm2 Badge from vim?
I want to call the function iterm2_set_user_var VARIABE VALUE
from vim/neovim using call system()
. 我想使用
call system()
从vim / neovim调用函数iterm2_set_user_var VARIABE VALUE
。 However, I get the following. 但是,我得到以下信息。
zsh:1: command not found: iterm2_set_user_var shell returned 127
This is already done in node.js: How to exec script to set iterm2 Badge from nodejs? 这已经在node.js中完成: 如何执行脚本以从nodejs设置iterm2 Badge?
I'm guessing you've defined iterm2_set_user_var
as a shell function in your zsh config somewhere. 我猜您已经在zsh配置中的某个位置将
iterm2_set_user_var
定义为Shell函数。 Vim doesn't invoke a login shell with the system
function. Vim不会使用
system
功能调用登录shell。 I think you have two options: 我认为您有两种选择:
shellcmdflag
to force a login shell by adding l
to the flags currently there. shellcmdflag
可以通过在当前的标志中添加l
来强制登录shell。 This would affect all :!
:!
commands in vim as well. iterm2_set_user_var
as an executable somewhere in your $PATH
. iterm2_set_user_var
定义为$PATH
某个位置的可执行文件。 Either should work fine. 两者都应该工作正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.