Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in extracting variable values containing | (#81)
The bug happens whenever the variable being previewed contains a |. What happens is that the third regex used in __fzf_extract_var_info is greedy and will over-remove text up to the second to last |. For example: $ set variable "a | b | c | d" $ __fzf_extract_var_info variable (set --show | psub) set in global scope, unexported, with 1 elements [1] d By making the third regex lazy, it now works properly: $ set variable "a | b | c | d" $ __fzf_extract_var_info variable (set --show | psub) set in global scope, unexported, with 1 elements [1] a | b | c | d Additionally, I've added a Fishtape test to make debugging these tricky regexes more easily in the future, which I expect to need to do as the master branch of Fish has already changed the output of set --show.
- Loading branch information