Skip to content

Add Windows support for context-bar.sh (fixes #5)#11

Open
hx3333 wants to merge 2 commits intoykdojo:mainfrom
hx3333:fix-windows-context-bar
Open

Add Windows support for context-bar.sh (fixes #5)#11
hx3333 wants to merge 2 commits intoykdojo:mainfrom
hx3333:fix-windows-context-bar

Conversation

@hx3333
Copy link
Copy Markdown

@hx3333 hx3333 commented Mar 16, 2026

Summary

This PR adds Windows support for the context-bar.sh status line script, fixing #5.

Changes

  • Cross-platform jq detection: Automatically detects Windows (Git Bash/MSYS2) via OSTYPE and MSYSTEM environment variables
  • Windows: Uses jq.exe from the script directory
  • Linux/Mac: Uses system jq (backward compatible)
  • Documentation: Added Windows setup instructions to README

Usage on Windows

  1. Download jq.exe from jqlang.github.io/jq
  2. Place jq.exe in ~/.claude/scripts/ alongside context-bar.sh
  3. Use Windows-style path in settings.json:
    {
      "statusLine": {
        "type": "command",
        "command": "/c/Users/USERNAME/.claude/scripts/context-bar.sh"
      }
    }

Testing

  • Tested on Windows 11 with Git Bash
  • Backward compatible with Linux/Mac (uses system jq)

Fixes #5

hx3333 and others added 2 commits March 16, 2026 21:51
- Use jq.exe from the same directory as the script

- Fixes issue where jq is not in PATH on Windows
Changes:
- Detect Windows (Git Bash/MSYS2) via OSTYPE and MSYSTEM env vars
- Use jq.exe from script directory on Windows
- Use system jq on Linux/Mac (backward compatible)
- Add Windows setup instructions to README

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ykdojo
Copy link
Copy Markdown
Owner

ykdojo commented Mar 17, 2026

Thank you. I don't have an easy way to test this on Windows, so I'll wait for someone else to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tip 0: Windows support for context-bar.sh in statusLine

2 participants