git - Fish shell 改变了 git stash 引用的工作方式。如何配置 shell 来解决这个问题?

标签 git fish

我开始使用 fish shell ,一切都很顺利......直到我尝试使用藏品。

由于某种原因: git stash show -p stash@{1} 将导致:

错误消息:stash@1 不是有效的引用

很长一段时间我都没有发现错误消息不包含存储编号的 {}

我最终发现我必须引用 stash 引用: git stash show -p 'stash@{1}'

我需要设置某种 shell 配置吗?

我找不到任何有关 Fish shell 将 {} 解释为其他内容或删除大括号的信息。

最佳答案

从 Fish shell 3.1(今天发布!)开始,不再需要引用。

在 3.1 之前,{1} 被理解为括号扩展,因此必须加引号才能获取文字括号。

(行为已在 this issue 中更改。)

关于git - Fish shell 改变了 git stash 引用的工作方式。如何配置 shell 来解决这个问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60198994/

相关文章:

linux - 如何在 Fish shell 中设置变量?

ssh - 如何在远程服务器上运行本地 Fish 脚本?

ruby-on-rails - 当它为 "hung up"或没有响应时,如何推送到 Heroku 或获取信息/状态?

git - 设置分支不可 merge

git - Mingw-w64:ssh-add 工作直到 git fetch(连接到代理时出错:文件描述符错误)

linux - fish shell : How can I customize the colors for the autocomplete feature?

git - 如何使用Composer进行浅克隆?

GIT 如何在没有提交的情况下重置

named-parameters - 我可以将命名参数传递给 Fish 脚本吗?

fish - “多个中的至少一个”条件