🐞 Git Branch detection captures shell outputs rather than just the branch
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- git, macos, swift, zsh
调研方向
首先跟踪 CodeEdit 的 Git 分支检测,以及用于填充 Toolbar 副标题的 shell 命令;issue 未指定文件或测试。通过在 ~/.zprofile 中添加 echo 语句并打开一个 Git 仓库来复现,然后确认只显示分支,且排除 shell 输出。
由索引模型根据 Issue 内容生成。
描述
Description
In my ZSH configuration (~/.zprofile) I echo text out, this runs when I open a new shell, but the text echoed shows up in the Toolbar's subtitle where it shows the branch.
To Reproduce
This assumes the same machine configuration as me, since I'm unsure how much of this is CodeEdit's decisions VS my setup, though assuming you run ZSH as your standard shell I'd assume it would replicate properly.
open .zprofile
open ~/.zprofile -a CodeEdit
add an echo statement, such as
echo "This text should not show up in CodeEdit branch info, it should only be seen in interactive shells"
save .zprofile
Quite CodeEdit
Open a Git initialized repository in CodeEdit
Or make a temporary Git repo and open it...
setopt INTERACTIVE_COMMENTS
# ↑ allow comments in the shells interactive mode (default off in zsh)
dir="$(mktemp -d)" # makes a temporary folder (so it auto deletes by the OS later)
cd $dir # go to our temporary directory
git init # initialize a Git repository in the directory
open . -a CodeEdit # open our temporary git repo in CodeEdit
and in the branch section you will see an output like the image attached
Expected Behavior
CodeEdit runs a non-interactive shell to capture the current branch, and only captures branch info via Git's stdout, rather than the shell contents
Version Information
CodeEdit: 0.3.6 (47)
macOS: 26.1.0
Additional Context
No response
Screenshots
- 主要语言
- Swift
- 星标
- 23k
- 派生
- 1.2k
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CodeEditApp/CodeEdit 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
CodeEditApp/CodeEdit#2190 ·
-
难度 1/5 1 小时以内 新手友好度 15/100
CodeEditApp/CodeEdit#2195 · 7 个 reaction ·
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
CodeEditApp/CodeEdit#2185 ·
-
难度 5/5 一周以上 新手友好度 25/100
CodeEditApp/CodeEdit#2181 ·
-
bug
难度 4/5 3-5 天 新手友好度 35/100
CodeEditApp/CodeEdit#2180 ·
查看 CodeEditApp/CodeEdit 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
Cocoanetics/SwiftACP#52 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
storyblok/storyblok-swift#12 ·
-
bug yapback
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 95/100