未知类型的文件预览尝试使用cat
This commit is contained in:
parent
7fbce52dde
commit
31240748dd
|
|
@ -12,6 +12,7 @@ alias gpl='git pull origin $(git symbolic-ref --short -q HEAD) --ff-only'
|
||||||
alias gd='git --no-pager diff'
|
alias gd='git --no-pager diff'
|
||||||
alias gs='git --no-pager status'
|
alias gs='git --no-pager status'
|
||||||
alias gss='git --no-pager status -s'
|
alias gss='git --no-pager status -s'
|
||||||
|
alias gsh='git --no-pager show'
|
||||||
alias gpt='git push origin --tags'
|
alias gpt='git push origin --tags'
|
||||||
alias glt='git tag -n --sort=taggerdate | tail -n ${1-10}'
|
alias glt='git tag -n --sort=taggerdate | tail -n ${1-10}'
|
||||||
gat() { git tag -a $1 -m "$2" }
|
gat() { git tag -a $1 -m "$2" }
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,5 @@ elif [ "$category" = image ]; then
|
||||||
command -v ueberzug 2&>/dev/null && bash $OMZ/lib/img_preview.sh "$1"|| img2txt "$1"
|
command -v ueberzug 2&>/dev/null && bash $OMZ/lib/img_preview.sh "$1"|| img2txt "$1"
|
||||||
else
|
else
|
||||||
echo $1 is a $category file
|
echo $1 is a $category file
|
||||||
|
(bat -p --color=always "$1" || cat "$1") 2>/dev/null | head -1000
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue