Fish Unknown 命令:__fish_pwd

问题描述

在fish中运行任何命令时,我收到以下错误

def decode_embedding(embedding_bytes):
  return np.frombuffer(embedding_bytes.numpy())
@tf.function()
def tf_decode_embedding(embedding_bytes):
  return tf.py_function(decode_embedding,inp=[embedding_bytes],Tout=tf.float32)

feature_description = {
        'classes_text': tf.io.FixedLenFeature((),tf.string),'data': tf.io.FixedLenFeature([],tf.string)
    }

def _parse_data_function(example_proto):
    example = tf.compat.v1.parse_single_example(example_proto,feature_description)
    example['classes_text'] = label_table.lookup(example['classes_text'])
    example['data'] = tf_decode_embedding(example['data'])
    return example

parsed_dataset = tfrecord_ds.map(_parse_data_function)

dataset = parsed_dataset.cache().shuffle(1000).batch(32).prefetch(tf.data.AUTOTUNE)

不确定如何解决这个问题。我试过卸载/重新安装鱼。

我见过的其他解决方案 (fish: Unknown command '__fish_pwd') 建议删除 fish: UnkNown command: __fish_pwd /opt/homebrew/Cellar/fish/3.2.2/share/fish/functions/fish_title.fish (line 1): __fish_pwd ^ in command substitution called on line 6 of file /opt/homebrew/Cellar/fish/3.2.2/share/fish/functions/fish_title.fish in function 'fish_title' with arguments 'echo\ \$PATH' in command substitution /opt/homebrew/Cellar/fish/3.2.2/share/fish/functions/fish_title.fish (line 6): UnkNown error while evaluating command substitution echo (set -q argv[1] && echo $argv[1] || status current-command) (__fish_pwd) ^ ,但除了我的 PATH 之外,我什么都没有。

我的 config.fish 看起来像这样:

$PATH

解决方法

这看起来像是您的 $PATH 已损坏,因为它不包含 uname

它可能在 /usr/bin 或 /usr/sbin 中(“/usr”是不是 /Users),而您错过了。

(fish 在这里使用 uname 来确定您是否在 Cygwin 上,在这种情况下它会改变它在标题中打印的 $PWD。这当然非常俗气,错误消息是“未知错误”应该改进。无论如何,您的 $PATH 不完整,因此您应该修复它)

但是除了我的 PATH 之外,我什么都没有。

请尝试删除它并重新启动所有的鱼会话。这很可能会解决问题。