Shell Integration - TomPlanche/rona GitHub Wiki

Shell Integration

Rona provides comprehensive shell integration support for various shells. This guide will help you set up and configure Rona for your preferred shell.

Supported Shells

  • Bash
  • Fish
  • Zsh
  • PowerShell

Installation by Shell

Fish Shell

  1. Generate the completion script:
rona completion fish > ~/.config/fish/completions/rona.fish
  1. Add the function to your Fish configuration:
echo "function rona
    command rona \$argv
end" >> ~/.config/fish/functions/rona.fish
  1. Reload your Fish configuration:
source ~/.config/fish/config.fish

Bash

  1. Add the completion script to your .bashrc:
rona completion bash >> ~/.bashrc
  1. Add the alias:
echo 'alias rona="command rona"' >> ~/.bashrc
  1. Reload your Bash configuration:
source ~/.bashrc

Zsh

  1. Add the completion script to your .zshrc:
rona completion zsh >> ~/.zshrc
  1. Add the alias:
echo 'alias rona="command rona"' >> ~/.zshrc
  1. Reload your Zsh configuration:
source ~/.zshrc

PowerShell

  1. Add the completion script to your PowerShell profile:
rona completion powershell | Out-File -Append $PROFILE
  1. Add the alias:
Set-Alias -Name rona -Value rona
  1. Reload your PowerShell profile:
. $PROFILE

Features

Command Completion

  • Command and flag completion
  • Git status file completion
  • Context-aware suggestions
  • Pattern completion

Function Integration

  • Git command integration
  • Editor integration
  • Pattern matching
  • Status tracking

Customization

  • Shell-specific settings
  • Completion customization
  • Alias configuration
  • Function overrides

Usage Examples

Fish Shell

# Command completion
rona <TAB>

# Pattern completion
rona -a "*.rs" <TAB>

# Git status completion
rona -a <TAB>

Bash

# Command completion
rona <TAB>

# Pattern completion
rona -a "*.rs" <TAB>

# Git status completion
rona -a <TAB>

Zsh

# Command completion
rona <TAB>

# Pattern completion
rona -a "*.rs" <TAB>

# Git status completion
rona -a <TAB>

PowerShell

# Command completion
rona <TAB>

# Pattern completion
rona -a "*.rs" <TAB>

# Git status completion
rona -a <TAB>

Troubleshooting

Common Issues

  1. Completion Not Working

    • Verify the completion script is properly installed
    • Check shell configuration file permissions
    • Ensure the shell is reloaded
  2. Function Not Found

    • Verify the function is properly defined
    • Check function file permissions
    • Ensure the shell is reloaded
  3. Alias Not Working

    • Verify the alias is properly defined
    • Check for conflicts with existing aliases
    • Ensure the shell is reloaded

Best Practices

  1. Shell Configuration

    • Keep shell configuration files organized
    • Use version control for shell configurations
    • Document custom configurations
  2. Completion Scripts

    • Update completion scripts regularly
    • Test completion in different scenarios
    • Report issues to the project
  3. Function Integration

    • Use consistent function naming
    • Document function behavior
    • Test function integration

Next Steps

  • Check the Usage Guide for practical examples
  • Explore the Command Reference for detailed command information
  • Visit the FAQ for common questions and answers
⚠️ **GitHub.com Fallback** ⚠️