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

fix(fish): clean up the fish script options #1370

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Conversation

arcuru
Copy link
Sponsor Contributor

@arcuru arcuru commented Nov 2, 2023

Closes #1368

I reviewed and updated the options we use in the fish script, fixing several issues:

  1. Removing the --groups option as reported in atuin reports an unknown option "-qg" for string match #1368, it's not needed if we're only testing whether the match exists.
  2. Setting the correct scoping for variables. Setting all local variables to be local, -l, and removing the -x (export) setting for ATUIN_HISTORY_ID as it's unnecessary. The non-local variables (s, h, hist) were clobbering any user-defined variables with the same name.
  3. Renaming h and hist to have an ATUIN_ prefix, as those variables are accessible from user-defined code. Without this, using enter_accept with the history item echo $h would have given the user the script value of $h instead of their own.

Copy link

vercel bot commented Nov 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
atuin-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2023 2:46pm

Copy link
Member

@ellie ellie left a comment

Choose a reason for hiding this comment

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

Thank you! 🙏

@ellie ellie enabled auto-merge (squash) November 3, 2023 09:46
@ellie ellie merged commit 891e8e5 into atuinsh:main Nov 3, 2023
10 checks passed
@arcuru arcuru deleted the fish-options branch November 3, 2023 15:43
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.

atuin reports an unknown option "-qg" for string match
2 participants