Skip to content

feat: support non-hidden sgptrc config file in .config/shell_gpt#766

Open
mariano-soto wants to merge 1 commit intoTheR1D:mainfrom
mariano-soto:feature/support-sgptrc-config
Open

feat: support non-hidden sgptrc config file in .config/shell_gpt#766
mariano-soto wants to merge 1 commit intoTheR1D:mainfrom
mariano-soto:feature/support-sgptrc-config

Conversation

@mariano-soto
Copy link
Copy Markdown

Summary

This PR adds support for a non-hidden configuration file sgptrc inside .config/shell_gpt/, as requested in #751, in addition to the existing .sgptrc.

Motivation

Currently, ShellGPT reads configuration from .config/shell_gpt/.sgptrc. While functional, using a hidden file inside an already hidden directory (.config) feels redundant and slightly unintuitive.

Supporting sgptrc aligns better with common conventions in .config directories and improves developer experience.

Changes

  • Added support for .config/shell_gpt/sgptrc
  • Implemented fallback logic to preserve backward compatibility
  • Ensured no breaking changes to existing behavior

Behavior

Configuration file resolution now follows this priority order:

  1. .config/shell_gpt/sgptrc
  2. .config/shell_gpt/.sgptrc (fallback)

Testing

Added tests to verify:

  • sgptrc is used when present
  • .sgptrc is used when sgptrc is absent

All tests pass and linters succeed.

Backward Compatibility

This change is fully backward compatible. Existing users relying on .sgptrc will continue to work without modification.

Future Improvements (optional)

  • Emit a deprecation warning when .sgptrc is used

Closes #751

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.

Suggestion: support .config/shell_gpt/sgptrc

1 participant