🐞 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
- 星號
- 23.1k
- 分支
- 1.2k
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 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 · 12 個 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
-
area:ai-suggestions bug P1
難度 2/5 1-3 小時 新手友好度 82/100
uttrflow/uttrflow-swift#3456 ·
維護者通常 1 天內回覆
-
React-Native Waiting for: Product Owner
難度 2/5 1-3 小時 新手友好度 84/100
getsentry/sentry-react-native#6822 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 68/100
vorssaint/vorssaint-utils#2545 ·
維護者通常 1 天內回覆
-
documentation
難度 1/5 1-3 小時 新手友好度 88/100
hoiekim/turnip-ios#210 ·
維護者通常 1 天內回覆