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

Improve shell detection and add CLI argument validation #10

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

dybdeskarphet
Copy link
Contributor

@dybdeskarphet dybdeskarphet commented Dec 11, 2024

Hey, sorry for the mess my formatter created. With this PR, script:

  • Checks the file existence and validates CLI arguments in two different functions.
  • Prints an error message if invalid arguments have passed.
  • detect_history_file uses $SHELL environment variable if no arguments have passed.
  • Checks if $ZDOTDIR exists for zsh shell.

@islemci
Copy link
Owner

islemci commented Dec 12, 2024

Seems like it doesn't function as intended, have you tested the code on your device?

Screenshot 2024-12-12 at 16 39 31

@islemci islemci added enhancement New feature or request good first issue Good for newcomers labels Dec 12, 2024
@dybdeskarphet
Copy link
Contributor Author

Sorry, I accidentally deleted bash from the possible shells. It should work now.

@islemci islemci merged commit cabfbdf into islemci:main Dec 12, 2024
@islemci
Copy link
Owner

islemci commented Dec 12, 2024

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants