Skip to content

Improve PS1 prompt for narrow terminals#68

Draft
ikuwow wants to merge 4 commits intomasterfrom
feature/multiline-prompt
Draft

Improve PS1 prompt for narrow terminals#68
ikuwow wants to merge 4 commits intomasterfrom
feature/multiline-prompt

Conversation

@ikuwow
Copy link
Owner

@ikuwow ikuwow commented Feb 4, 2026

Summary

  • マルチラインプロンプト化(情報行と入力行を分離)
  • 記号(┌─)で視覚的に区別しやすく
  • 空行でコマンド出力とプロンプトを区別

変更後のプロンプト

(空行)
┌─ localhost: dotfiles (master) <AWS:prd>
$

Test plan

  • source ~/.bash_profile で新しいプロンプトを確認
  • gitリポジトリ内でブランチ名が表示されることを確認
  • AWS profile設定時に表示されることを確認
  • 狭い横幅のターミナルでも入力行が確保されることを確認

🤖 Generated with Claude Code

ikuwow and others added 4 commits February 12, 2026 16:55
Add newline before dollar sign to separate info line from input line.
This improves usability when terminal width is limited.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add gray horizontal line matching terminal width as separator
- Add cyan info line with box symbol (┌─)
- Info line shows: directory, git branch, AWS profile, GC config
- Yellow dollar sign on separate input line
- SSH indicator integrated into info line

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Keep multiline layout and box symbol, but remove:
- Gray horizontal separator line (breaks on terminal resize)
- Cyan color from info line (too subtle)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Long branch names are truncated to max 20 characters:
- Prefix (feature/, fix/, etc.) is kept intact
- Name part is shortened: beginning..end

Example: feature/implement-new-auth -> feature/imp..auth

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ikuwow ikuwow force-pushed the feature/multiline-prompt branch from 0139636 to abf56b1 Compare February 12, 2026 07: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