瀏覽代碼

nuke: add glow to preview markdown

master
Arun Prakash Jana 5 年之前
父節點
當前提交
d224016011
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 1 個檔案被更改,包括 10 行新增1 行删除
  1. +10
    -1
      plugins/nuke

+ 10
- 1
plugins/nuke 查看文件

@@ -45,6 +45,7 @@
# audio: mocplay (nnn plugin using MOC), mpv, mediainfo, exiftool # audio: mocplay (nnn plugin using MOC), mpv, mediainfo, exiftool
# torrent: rtorrent, transmission-show # torrent: rtorrent, transmission-show
# odt|ods|odp|sxw: odt2txt # odt|ods|odp|sxw: odt2txt
# md: glow (https://github.com/charmbracelet/glow)
# htm|html|xhtml: w3m, lynx, elinks # htm|html|xhtml: w3m, lynx, elinks
# json: jq, python (json.tool module) # json: jq, python (json.tool module)
# Multimedia by mime: # Multimedia by mime:
@@ -165,6 +166,14 @@ handle_extension() {
fi fi
exit 1;; exit 1;;


## Markdown
md)
if which glow >/dev/null 2>&1; then
glow -sdark "${FPATH}" | less -R
exit 0
fi
;;

## HTML ## HTML
htm|html|xhtml) htm|html|xhtml)
## Preview as text conversion ## Preview as text conversion
@@ -375,7 +384,7 @@ handle_mime() {
## Text ## Text
text/* | */xml) text/* | */xml)
vi "${FPATH}" vi "${FPATH}"
exit 1;; exit 0;;
## Syntax highlight ## Syntax highlight
# if [[ "$( stat --printf='%s' -- "${FPATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then # if [[ "$( stat --printf='%s' -- "${FPATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
# exit 2 # exit 2


||||||
x
 
000:0
Loading…
取消
儲存