plugin-foreign-env icon indicating copy to clipboard operation
plugin-foreign-env copied to clipboard

fish: Unknown command 'less -R'

Open toonn opened this issue 5 years ago • 0 comments

There seems to be a problem in parsing of env vars like PAGER. We noticed when running history that fish errored on the pager, you can find all the details in fish-shell/fish-shell#5994, reproduced in part here for convenience:

toonn@terra ~> history
fish: Unknown command 'less -R'
/nix/store/m8j4gqqkdy3nm0v738kjivimnlqkdqpx-fish-3.0.2/share/fish/functions/history.fish (line 99): 
                builtin history search $search_mode $show_time $max_count $_flag_case_sensitive $_flag_reverse $_flag_null -- $argv | $pager
                                                                                                                                      ^
in function 'history'
	called on standard input

toonn@terra ~> set PAGER less
toonn@terra ~> echo $PAGER
less
toonn@terra ~> history
echo $PAGER
set PAGER less
env PAGER=less history # <- this didn't work because history's a function probably

@adisbladis tracked this down to the fenv call here.

toonn avatar Jul 17 '19 18:07 toonn