为什么鱼重定向没有按预期工作

问题描述

当我尝试将 fish shell 输出重定向文件时,command 被放入文件中,而不是命令输出中。为什么?这在 bash、zsh 等中按预期工作

示例:

$  fish --version
fish,version 3.2.0

$ rm -f /tmp/foo
$ echo bar > /tmp/foo
$ cat /tmp/foo
echo bar

# expected output:
bar

# It's not related to the echo command. e.g:
$ ls -l > /tmp/foo
$ cat /tmp/foo
ls -l

解决方法

这似乎是由 fishgretel/fasd 中的错误引起的

https://github.com/fishgretel/fasd/commit/98fb3873aae9adcca2ffc4b4b3958e45d74cb894