skim
skim copied to clipboard
Suffix search with option --nth includes delimiter
echo -e "test;alpha\nothertest;beta\ntestother;gamma" | sk --delimiter ';' --nth 1 --query 'other$'
Should show line "testother;gamma", but doesn't.
echo -e "test;alpha\nothertest;beta\ntestother;gamma" | sk --delimiter ';' --nth 1 --query 'other;$'
Solves the mystery: delimiters are not removed from the searched content. This is probably not intended :-)
@lotabout I am not too familiar with the GitHub labels, does by-design
mean that this is not going to change?
I am wondering about:
echo -e "a:b" | sk -d ':' --with-nth 1
This is showing a:
instead of a
in the search. This does not seem right to me.
This seems like the same behaviour as fzf
@junegunn gave a reasoning for the behaviour (in fzf) here: https://github.com/junegunn/fzf/issues/2154#issuecomment-682589184
I think the key is that the delimiter is a regex.
If it would only allow for a single character, I think the behaviour could be possible as @tobx (and me) expected.