Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fish integration #576

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

turn1a
Copy link

@turn1a turn1a commented Jun 9, 2024

Summary

This pull request introduces several enhancements and fixes to the ShellGPT project, including improvements to the README.md documentation, and the addition of Fish shell integration.

Changes

README.md

  • General Improvements: Enhanced readability and formatting throughout the document.
  • Fish Shell Support: Updated documentation to reflect support for the Fish shell, including installation and usage instructions.
  • Additional Examples: Added more examples to demonstrate the usage of ShellGPT in various scenarios.
  • Clarifications: Provided additional clarifications and tips for better user experience.

Code Changes

sgpt/app.py

  • Shell Integration: Updated the help message for the install_integration option to include Fish shell support.

sgpt/integration.py

  • Fish Shell Integration: Added a new Fish shell integration script to enable ShellGPT completions directly in the Fish shell.

sgpt/utils.py

  • Integration Logic: Updated the install_shell_integration function to support Fish shell, in addition to ZSH and Bash.

Installation and Usage

  • Shell Integration: Users can now install shell integration for ZSH, Bash, and Fish shells using the sgpt --install-integration command.
  • Hotkeys: Default hotkeys for invoking ShellGPT have been specified for each shell:
    • ZSH and Bash: Ctrl+l
    • Fish: Ctrl+/ (Ctrl+/ is already taken in fish)

Documentation

  • Enhanced Examples: Provided detailed examples for using ShellGPT with various shell commands, code generation, and chat modes.
  • Function Calling: Explained how to define and use custom functions with ShellGPT.
  • Roles and Request Cache: Added sections on creating custom roles and controlling request cache.

Conclusion

These changes aim to improve the overall usability and functionality of ShellGPT, making it more versatile and user-friendly across different shell environments. The updated documentation ensures that users have clear and comprehensive guidance on how to leverage the full capabilities of ShellGPT.

.gitignore Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion having a "global" .gitignore is more efficient in the long run. Instead of adding a .gitignore file to each of your repositories, you can set up a global gitignore file. This allows you to specify ignore patterns that apply to all of your repositories, saving you time. You can do this by running:

# Create a .gitignore file in home directory ~/.gitignore
git config --global core.excludesFile '~/.gitignore'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll change that.

To be honest, I didn't even know that was an option. I've tried to think of a scenario where some of the repositories I work on might have mutually exclusive .gitignore files, but I couldn't come up with any. So, I'm going to switch to the per-user .gitignore file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheR1D Done.

@TheR1D
Copy link
Owner

TheR1D commented Jun 20, 2024

@turn1a could you please resolve lint issues? Check the "Lint and Test" pipeline for details or run sh scripts/lint.sh.

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.

2 participants