为什么tmuxinator zsh完整文件不起作用?

问题描述

根据提示,我下载了文件

https://raw.githubusercontent.com/tmuxinator/tmuxinator/master/completion/tmuxinator.zsh

插入/usr/local/share/zsh/site-functions/_tmuxinator文件路径),但自动完成功能无效。

然后我像下面的~/.zshrc中一样来获取文件,它也不起作用。

. /usr/local/share/zsh/site-functions/_tmuxinator

我的配置环境是:

  • zsh:zsh 5.8(x86_64-suse-linux-gnu)
  • tmuxinator:tmuxinator 2.0.1

然后我将oh-my-zsh用作我的zsh环境,并使用rbenv安装tmuxinator。

我系统中的fpath环境变量是:

/home/run/.oh-my-zsh/plugins/git /home/run/.oh-my-zsh/functions /home/run/.oh-my-zsh/completions /usr/local/share/zsh/site-functions /usr/share/zsh/site-functions /usr/share/zsh//functions/Calendar /usr/share/zsh//functions/Chpwd /usr/share/zsh//functions/Completion /usr/share/zsh//functions/Completion/Base /usr/share/zsh//functions/Completion/Linux /usr/share/zsh//functions/Completion/Unix /usr/share/zsh//functions/Completion/X /usr/share/zsh//functions/Completion/Zsh /usr/share/zsh//functions/Completion/openSUSE /usr/share/zsh//functions/Exceptions /usr/share/zsh//functions/MIME /usr/share/zsh//functions/Math /usr/share/zsh//functions/Misc /usr/share/zsh//functions/Newuser /usr/share/zsh//functions/Prompts /usr/share/zsh//functions/TCP /usr/share/zsh//functions/VCS_Info /usr/share/zsh//functions/VCS_Info/Backends /usr/share/zsh//functions/Zftp /usr/share/zsh//functions/Zle /etc/zsh_completion.d

其中包含目录/usr/local/share/zsh/site-functions

解决方法

您可能必须强制重建from googleapiclient.discovery import build from googleapiclient.discovery_cache.base import Cache import google.auth import pprint as pp def get_cloud_function_api_service(): class MemoryCache(Cache): _CACHE = {} def get(self,url): return MemoryCache._CACHE.get(url) def set(self,url,content): MemoryCache._CACHE[url] = content scopes = ['https://www.googleapis.com/auth/cloud-platform'] # If the environment variable GOOGLE_APPLICATION_CREDENTIALS is set,# ADC uses the service account file that the variable points to. # # If the environment variable GOOGLE_APPLICATION_CREDENTIALS isn't set,# ADC uses the default service account that Compute Engine,Google Kubernetes Engine,App Engine,Cloud Run,# and Cloud Functions provide # # see more on https://cloud.google.com/docs/authentication/production credentials,project_id = google.auth.default(scopes) service = build('cloudfunctions','v1',credentials=credentials,cache=MemoryCache()) return service google_api_service = get_cloud_function_api_service() name = 'projects/{project_id}/locations/us-central1/functions/function-1' body = { 'data': '{ "message": "It is awesome,you are develop on Stack Overflow language!"}' # json passed as a string } result_call = google_api_service.projects().locations().functions().call(name=name,body=body).execute() pp.pprint(result_call) # expected out out is: # {'executionId': '3h4c8cb1kwe2','result': 'It is awesome,you are develop on Stack Overflow language!'}

zcompdump