Skip to content

refactor: simplify and optimize statusline.sh#24

Closed
glauberlima wants to merge 1 commit intomainfrom
refactor/simplify-statusline
Closed

refactor: simplify and optimize statusline.sh#24
glauberlima wants to merge 1 commit intomainfrom
refactor/simplify-statusline

Conversation

@glauberlima
Copy link
Copy Markdown
Owner

  • Remove dead code: append_if() (never called), sep() function
  • Pre-compute separator as readonly SEP constant (eliminates subshell)
  • Simplify get_random_message_color() from IFS loop to bash array
  • Merge format_git_clean/dirty into single format_git_branch()
  • Collapse format_git_info() into build_git_component() (single parse)
  • Cache get_context_tier() result in build_context_component()
  • Replace echo|wc -l with bash-native array counting
  • Net: -89 lines, 4 fewer subshells per render

- Remove dead code: append_if() (never called), sep() function
- Pre-compute separator as readonly SEP constant (eliminates subshell)
- Simplify get_random_message_color() from IFS loop to bash array
- Merge format_git_clean/dirty into single format_git_branch()
- Collapse format_git_info() into build_git_component() (single parse)
- Cache get_context_tier() result in build_context_component()
- Replace echo|wc -l with bash-native array counting
- Net: -89 lines, 4 fewer subshells per render

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@glauberlima glauberlima deleted the refactor/simplify-statusline branch March 10, 2026 22:55
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.

1 participant