Skip to content

feat: Add Windows compatibility #46

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YoungPhlo
Copy link

Relates to

Add Windows compatibility to Shell Sage

Risks

Low. This PR adds Windows compatibility without modifying existing Unix functionality.

Background

What does this PR do?

This PR adds Windows compatibility to Shell Sage, enabling the tool to run on Windows systems. It:

  1. Adds Windows system information gathering using systeminfo instead of uname
  2. Adds PowerShell history support as an alternative to tmux history
  3. Adds robust error handling for tmux commands
  4. Creates a helper function is_tmux_available() to check for tmux availability
  5. Updates the main function to work with both Unix and Windows environments

What kind of change is this?

Features (non-breaking change which adds functionality)

Documentation changes needed?

My changes do not require a change to the project documentation as the functionality is transparent to users.

Testing

Where should a reviewer start?

Review the changes to _sys_info() and get_history() functions which contain the core Windows compatibility logic.

Detailed testing steps

  • Run Shell Sage on a Windows system and verify it can gather system information
  • Verify PowerShell history is collected when tmux is not available
  • Ensure the tool still works correctly on Unix systems
  • Test error handling by running on systems without tmux installed

Deploy Notes

No special deployment steps required. The changes are backward compatible with existing Unix functionality.

Copy link

gitnotebooks bot commented Apr 1, 2025

Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/AnswerDotAI/shell_sage/pull/46

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