hstr icon indicating copy to clipboard operation
hstr copied to clipboard

Confusion about metrics-based view

Open tschaub opened this issue 5 years ago • 0 comments

I'm wondering if I am confused about the order of results in the default metrics-based view. I'm uncertain if higher ranking matches are at the bottom of the list or the top.

Without any special HSTR_CONFIG, I see what I would think would be higher ranking results at the bottom of the list.

If I start with this in my history:

echo "Export is a word that is used a lot"
export LOT=S

When I type Ctrlrexport LO, I would guess that the second entry (export LOT=S) would be the highest ranking result. This is what the results look like:

- HISTORY - view:ranking (C-w) - match:keywords (C-e) - case:insensitive (C-t) - 3916/13233/0 -----------------------------------
 echo "Export is a word that is used a lot"
 export LOT=S

So this makes me wonder if higher ranking results are at the bottom of the list or if the ranking doesn't behave like I expect.

When I have configured hstr with export HSTR_CONFIG=raw-history-view, I see these results:

- HISTORY - view:history (C-w) - match:keywords (C-e) - case:insensitive (C-t) - 3916/13234/0 -----------------------------------
 export LOT=S
 echo "Export is a word that is used a lot"

So it looks like if I want more recent results at the top, I can use raw-history-view. I liked the idea of using ranked results, but I may be misunderstanding how results are ranked or how they are ordered in the output.

Also, thank you for your work on this. It has made my work life so much nicer.

tschaub avatar May 22 '19 17:05 tschaub