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

Add new custom variable 'projectile-cmd-hist-ignoredups' #1877

Conversation

LaurenceWarne
Copy link
Contributor

@LaurenceWarne LaurenceWarne commented Jan 21, 2024

Hi! This PR adds new custom variable projectile-cmd-hist-ignoredups, which can be used to tweak how duplicates are dealt with in projectile's command history. The custom variable is more or less identical in behaviour to eshell-hist-ignoredups.

Specifically, the existing default behavior is maintained with the value of t, which means consecutive duplicates are ignored. A value of 'erase means only the last duplicate is kept, whilst a value of nil means all duplicates are kept.

(PR is an iteration on #1774)


Before submitting a PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if adding/changing user-visible functionality)

Thanks!

@LaurenceWarne LaurenceWarne force-pushed the add-custom-varaible-for-deduping-cmd-history branch 2 times, most recently from ba69dde to fee1ae7 Compare January 22, 2024 07:31
@bbatsov
Copy link
Owner

bbatsov commented Jan 22, 2024

The proposed change is fine by me. Might be a good idea to mention this configuration option somewhere in the docs as well, otherwise I doubt many people will find it.

A value of t means consecutive duplicates are ignored.
A value of `erase' means only the last duplicate is kept.
A value of nil means nothing is ignored."
:type '(choice (const :tag "Don't ignore anything" nil)
Copy link
Owner

Choose a reason for hiding this comment

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

Don't forget to add a :package-version property here.

Add new custom variable 'projectile-cmd-hist-ignoredups', which can be
used to tweak how duplicates are dealt with in projectile's command
history.  The custom variable is identical in behaviour to
'eshell-hist-ignoredups'.

Specifically, the existing default behavior is maintained with the
value of t, which means consecutive duplicates are ignored.  A value
of 'erase means only the last duplicate is kept, whilst a value of nil
means all duplicates are kept.
@LaurenceWarne LaurenceWarne force-pushed the add-custom-varaible-for-deduping-cmd-history branch from fee1ae7 to 6d9cd66 Compare January 23, 2024 13:42
@LaurenceWarne
Copy link
Contributor Author

The proposed change is fine by me. Might be a good idea to mention this configuration option somewhere in the docs as well, otherwise I doubt many people will find it.

Makes sense, let me know if the section I've added it looks appropriate.

@bbatsov bbatsov merged commit f7e6084 into bbatsov:master Jan 23, 2024
5 of 6 checks passed
@bbatsov
Copy link
Owner

bbatsov commented Jan 23, 2024

Looks great! Thanks!

@LaurenceWarne
Copy link
Contributor Author

Thanks!

@LaurenceWarne LaurenceWarne deleted the add-custom-varaible-for-deduping-cmd-history branch January 23, 2024 14:35
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