gpt4 book ai didi

linux - Facebook PathPicker 不适用于 ZSH

转载 作者:太空宇宙 更新时间:2023-11-04 10:51:42 26 4
gpt4 key购买 nike

我正在尝试使用 Facebook PathPicker使用 ZSH。

当我尝试对选择运行命令时出现此错误:

> git status -uno | fpp

/root/.oh-my-zsh/oh-my-zsh.sh: line 13: syntax error near unexpected token `('
/root/.oh-my-zsh/oh-my-zsh.sh: line 13: `for config_file ($ZSH/lib/*.zsh); do'
/root/.zshrc: line 123: unsetopt: command not found
/etc/bash_completion.d/git: line 126: syntax error near unexpected token `<'
/etc/bash_completion.d/git: line 126: ` done < <(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')'
/etc/bash_completion.d/grub: line 417: `_grub_mkpasswd-pbkdf2': not a valid identifier

我目前使用的是 0.6 版的 fpp:

> fpp --version

fpp version 0.6.0

知道如何解决这个问题吗?

编辑:

这是 /bin/bash -x "$(whence fpp)" 的输出

> /bin/bash -x "$(whence fpp)"
+ SOURCE=/usr/local/bin/fpp
+ '[' -h /usr/local/bin/fpp ']'
+++ dirname /usr/local/bin/fpp
++ cd -P /usr/local/bin
++ pwd
+ BASEDIR=/usr/local/bin
++ readlink /usr/local/bin/fpp
+ SOURCE=/usr/local/PathPicker/fpp
+ [[ /usr/local/PathPicker/fpp != /* ]]
+ '[' -h /usr/local/PathPicker/fpp ']'
+++ dirname /usr/local/PathPicker/fpp
++ cd -P /usr/local/PathPicker
++ pwd
+ BASEDIR=/usr/local/PathPicker
+ PYTHONCMD=python
+ doProgram
+ python /usr/local/PathPicker/src/processInput.py
Using old result...
+ exec
+ python /usr/local/PathPicker/src/choose.py
+ sh /root/.fpp/.fpp.sh

这是/root/.fpp/.fpp.sh的内容:

shopt -s expand_aliases
if [ -f ~/.zshrc ]; then
source ~/.zshrc
fi
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
if [ -f ~/.bash_profile ]; then
source ~/.bash_profile
fi
if [ -f ~/.bash_aliases ]; then
source ~/.bash_aliases
fi
echo "executing command:"
echo "ls '/root/myfile'"
ls '/root/myfile'

我不是专家,但我想这个文件是即时创建的。这是 bash 获取 ~/.zshrc

的地方

我怎样才能避免这种情况?

最佳答案

您正在从 Bash 环境中获取 Zsh 初始化脚本,这是不允许的(因为语法不兼容)。检查你的 BASH_ENV 环境变量。

另外,你为什么要以 root 身份运行?

关于linux - Facebook PathPicker 不适用于 ZSH,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30667504/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com