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

Support for abbreviations #133

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Support for abbreviations #133

wants to merge 19 commits into from

Conversation

p1r473
Copy link
Contributor

@p1r473 p1r473 commented May 16, 2024

Add ability to show what alias you just used is aliased to (more like a "you used" opposite of "you should use" in case you forget you keep using aliases
Solves #129
Split off from #131

Can be disabled easily with
zstyle ':you-should-use:' you_should_use_alias_enabled false
zstyle ':you-should-use:*' you_should_use_abbreviation_enabled false

Also added something that I think makes sense
-local limit="${1:-9000000000000000}"
+local limit="${1:-$HISTSIZE}"

@AtifChy
Copy link
Contributor

AtifChy commented Jul 28, 2024

is this ready to be merged?

@@ -111,7 +127,6 @@ You should use: ${PURPLE}\"%alias\"${NONE}"
_write_ysu_buffer "$MESSAGE\n"
Copy link
Contributor

@AtifChy AtifChy Jul 28, 2024

Choose a reason for hiding this comment

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

_write_ysu_buffer prints an empty line when $MESSAGE is empty

Suggested change
_write_ysu_buffer "$MESSAGE\n"
[[ -n $MESSAGE ]] && _write_ysu_buffer "$MESSAGE\n"

this should go here

@AtifChy
Copy link
Contributor

AtifChy commented Jul 28, 2024

Additionally, I've observed that it displays the abbreviation tip message, whether or not an abbreviation is used.

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