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

CwdAwareHinter: remove cwd filter when there are no results #656

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

p00f
Copy link
Contributor

@p00f p00f commented Nov 3, 2023

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Merging #656 (4765933) into main (01e32da) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #656      +/-   ##
==========================================
- Coverage   49.22%   49.15%   -0.08%     
==========================================
  Files          43       43              
  Lines        7912     7924      +12     
==========================================
  Hits         3895     3895              
- Misses       4017     4029      +12     
Files Coverage Δ
src/hinter/cwd_aware.rs 0.00% <0.00%> (ø)

@fdncred
Copy link
Collaborator

fdncred commented Nov 3, 2023

As something to do later, maybe in another PR, it would be good to get rid of the expects like we discussed on discord. I'd like to see proper error handling on expects and unwraps in reedline if possible. But I'm not sure that should hold up this PR since reedline already has a collection of them.

@p00f p00f force-pushed the cwdawerehinter-fallback branch from e8a48a8 to 4190932 Compare November 7, 2023 23:32
@p00f p00f force-pushed the cwdawerehinter-fallback branch from 4190932 to 658c71c Compare November 13, 2023 12:43
Copy link
Member

@sholderbach sholderbach left a comment

Choose a reason for hiding this comment

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

Nice!

src/hinter/cwd_aware.rs Outdated Show resolved Hide resolved
@p00f p00f force-pushed the cwdawerehinter-fallback branch from ba34d9c to 4765933 Compare November 13, 2023 12:51
@p00f
Copy link
Contributor Author

p00f commented Nov 13, 2023

I just saw that the next nushell release is tomorrow so I wanted to get this in

@sholderbach
Copy link
Member

Tested it with the cwd_aware_hinter demo and works like a charm.

As we made it compulsory for the sqlite history let's get this qol improvement in.

@sholderbach sholderbach merged commit d9e0a32 into nushell:main Nov 13, 2023
8 checks passed
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.

Make cwd-aware history hints fall back to rest of history if no matches in cwd
3 participants