我正在尝试将鱼history
寻呼机设置为bat -l fish
用于语法突出显示。(即仅为命令设置PAGER
环境变量)。bat -l fish
history
我试过:
# 1:
alias history "PAGER='bat -l fish' history"
# results in "The function “history” calls itself immediately, which would result in an infinite loop"
# 2:
alias history "PAGER='bat -l fish' \history"
# results in the same.
# 3:
alias _old_history history
alias history "PAGER='bat -l fish' _old_history"
# results in (line 1): The call stack limit has been exceeded
我知道abbr
在这种情况下这是可行的,但这会改变我的history
命令,这不是我想要的。