|
| 1 | +--- |
| 2 | +name: statusline-edit |
| 3 | +description: "Edit existing status line configuration with pre-selected options based on current settings." |
| 4 | +--- |
| 5 | + |
| 6 | +# Status Line Edit |
| 7 | + |
| 8 | +Edit your existing Claude Code status line configuration. |
| 9 | + |
| 10 | +## Instructions |
| 11 | + |
| 12 | +**CRITICAL**: This command MUST NOT accept any arguments. If the user provided any text after this command, COMPLETELY IGNORE it. |
| 13 | + |
| 14 | +### Phase 1: Detect Existing Configuration |
| 15 | + |
| 16 | +1. Detect the operating system using Bash: `uname -s` |
| 17 | + - "Darwin" = macOS, "Linux" = Linux, otherwise assume Windows |
| 18 | +2. Check if the status line script exists: |
| 19 | + - **Mac/Linux**: `~/.claude/statusline.sh` |
| 20 | + - **Windows**: `C:/Users/USERNAME/.claude/statusline.ps1` |
| 21 | +3. If the script does NOT exist, display: |
| 22 | + ``` |
| 23 | + No status line script found at ~/.claude/statusline.sh |
| 24 | +
|
| 25 | + Run /statusline-wizard to set up your status line first. |
| 26 | + ``` |
| 27 | + Then STOP - do not continue. |
| 28 | + |
| 29 | +### Phase 2: Read Current Configuration |
| 30 | + |
| 31 | +Read the existing script file and parse the current SHOW_* variable values: |
| 32 | + |
| 33 | +**For Bash scripts**, look for lines like: |
| 34 | +```bash |
| 35 | +SHOW_MODEL=true |
| 36 | +SHOW_TOKEN_COUNT=true |
| 37 | +SHOW_PROGRESS_BAR=true |
| 38 | +SHOW_DIRECTORY=true |
| 39 | +SHOW_GIT_BRANCH=true |
| 40 | +SHOW_COST=false |
| 41 | +SHOW_DURATION=true |
| 42 | +SHOW_TIME=true |
| 43 | +SHOW_VERSION=true |
| 44 | +``` |
| 45 | + |
| 46 | +**For PowerShell scripts**, look for lines like: |
| 47 | +```powershell |
| 48 | +$SHOW_MODEL = $true |
| 49 | +$SHOW_TOKEN_COUNT = $true |
| 50 | +$SHOW_PROGRESS_BAR = $true |
| 51 | +$SHOW_DIRECTORY = $true |
| 52 | +$SHOW_GIT_BRANCH = $true |
| 53 | +$SHOW_COST = $false |
| 54 | +$SHOW_DURATION = $true |
| 55 | +$SHOW_TIME = $true |
| 56 | +$SHOW_VERSION = $true |
| 57 | +``` |
| 58 | + |
| 59 | +Store the current values to use as defaults in the wizard. |
| 60 | + |
| 61 | +### Phase 3: Configuration Wizard with Pre-selected Values |
| 62 | + |
| 63 | +Use AskUserQuestion with these grouped questions. **Pre-select options based on current values from Phase 2.** |
| 64 | + |
| 65 | +**Question 1 - Context Display** (multiSelect: true): |
| 66 | +Options (pre-select based on current config): |
| 67 | +- Model name - select if SHOW_MODEL=true |
| 68 | +- Token count (50k/100k) - select if SHOW_TOKEN_COUNT=true |
| 69 | +- Progress bar - select if SHOW_PROGRESS_BAR=true |
| 70 | + |
| 71 | +**Question 2 - Project Display** (multiSelect: true): |
| 72 | +Options (pre-select based on current config): |
| 73 | +- Current directory - select if SHOW_DIRECTORY=true |
| 74 | +- Git branch - select if SHOW_GIT_BRANCH=true |
| 75 | + |
| 76 | +**Question 3 - Session Display** (multiSelect: true): |
| 77 | +Options (pre-select based on current config): |
| 78 | +- Session duration - select if SHOW_DURATION=true |
| 79 | +- Current time - select if SHOW_TIME=true |
| 80 | +- Claude Code version - select if SHOW_VERSION=true |
| 81 | +- Session cost - select if SHOW_COST=true |
| 82 | + |
| 83 | +### Phase 4: Update Script |
| 84 | + |
| 85 | +Update ONLY the SHOW_* variables at the top of the existing script file based on wizard selections. |
| 86 | + |
| 87 | +**For Bash**: Use Edit tool to replace the configuration block: |
| 88 | +```bash |
| 89 | +SHOW_MODEL=true # Show model name (e.g., "Claude Opus 4.5") |
| 90 | +SHOW_TOKEN_COUNT=true # Show token usage count (e.g., "50k/100k") |
| 91 | +... |
| 92 | +``` |
| 93 | + |
| 94 | +**For PowerShell**: Use Edit tool to replace the configuration block: |
| 95 | +```powershell |
| 96 | +$SHOW_MODEL = $true # Show model name (e.g., "Claude Opus 4.5") |
| 97 | +$SHOW_TOKEN_COUNT = $true # Show token usage count (e.g., "50k/100k") |
| 98 | +... |
| 99 | +``` |
| 100 | + |
| 101 | +**IMPORTANT**: Do NOT regenerate the entire script. Only update the configuration variables section. |
| 102 | + |
| 103 | +### Success Message |
| 104 | + |
| 105 | +After successful update, display: |
| 106 | + |
| 107 | +``` |
| 108 | +Status line updated! |
| 109 | +
|
| 110 | +Check out your refreshed status line below! |
| 111 | +
|
| 112 | +Current configuration: |
| 113 | +- Model name: [enabled/disabled] |
| 114 | +- Token count: [enabled/disabled] |
| 115 | +- Progress bar: [enabled/disabled] |
| 116 | +- Directory: [enabled/disabled] |
| 117 | +- Git branch: [enabled/disabled] |
| 118 | +- Session cost: [enabled/disabled] |
| 119 | +- Duration: [enabled/disabled] |
| 120 | +- Time: [enabled/disabled] |
| 121 | +- Version: [enabled/disabled] |
| 122 | +``` |
0 commit comments