Adds pager option and uses $PAGER environment variable
Due to bat also reading the $PAGER environment variable, I first look to see if bat is available. If it is, I use that. If it isn't, I use the $PAGER environment variable. If that's not available, I use cat. I also added the --editor flag to the help output which had clearly been missed Close #12
This commit is contained in:
parent
90cef0d7c0
commit
0ac730ca3c
2 changed files with 9 additions and 1 deletions
|
@ -117,6 +117,6 @@ viewFile(){
|
|||
|
||||
filename="$(findFile "$id")"
|
||||
|
||||
bat --color=always --style=full "$filename"
|
||||
"$pager" "$filename"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue