Skip to content

Conversation

@ravisankar-PIO
Copy link

@ravisankar-PIO ravisankar-PIO commented Nov 21, 2025

Add PASE Terminal Prompt Customization Guide

Description

This PR adds a comprehensive guide to the Tips & Tricks section for customizing the PASE terminal prompt. The guide provides both simple and advanced methods to enhance terminal productivity by displaying useful information directly in the prompt.

Related Issue/Discussion

This addresses the suggestion made in #50 to create a guideline for PASE terminal prompt customization rather than implementing it as an automatic feature in Code for i.

What's Included

Content

  • Simple Method: Basic PS1 customization showing username, hostname, and current directory
  • Advanced Method: Git status integration using posh-git-sh, displaying:
    • Branch name with color-coded remote status
    • Staged and unstaged changes
    • Divergence from remote
    • Working tree status
  • Detailed Git Status Legend: Comprehensive explanation of all symbols and colors
  • Step-by-step instructions: Clear implementation steps for both methods
  • Examples and screenshots: Visual representation of the customized prompts

Features

  • Collapsible Git legend section to keep the page clean
  • Proper code syntax highlighting
  • Links to external references (posh-git, posh-git-sh)
  • Tips section for additional customization ideas

File Structure

/tips/
  └── customizeTerminals.mdx
/tips/images/
  └── basic_terminal_mod.png
  └── advanced_terminal_mod.png

Screenshots

Simple Method Result

simplemethod
Shows username@hostname:current/path format with color coding

Advanced Method Result

Git Status Prompt
Shows Git repository status with branch info and change indicators

Testing

  • Tested simple method on IBM i PASE terminal
  • Tested advanced method with Git repositories
  • Verified all commands work as documented
  • Confirmed color codes display correctly
  • Tested with both tracked and untracked files

Benefits

This guide helps users:

  • Avoid repeatedly typing pwd to check current location
  • See Git status without running git status command
  • Distinguish between different servers and users quickly
  • Improve overall terminal productivity

Notes

  • This is a guideline for personal customization, not an enforced feature
  • Users can modify colors and symbols to suit their preferences
  • Compatible with Python virtual environments
  • Persists across terminal sessions via .profile

Checklist

  • Content follows Code for i documentation style
  • All code examples tested and verified
  • External links are valid and appropriate
  • Screenshots added to /tips/images/ directory
  • Frontmatter includes proper tags and description
  • Content is clear and beginner-friendly

Future Enhancements

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