.dotfiles/.scripts/pager.sh

15 lines
326 B
Bash
Raw Permalink Normal View History

2024-10-27 16:57:21 +02:00
#!/bin/bash
set -eu
INPUT_LINE_NUMBER=${1:-0}
CURSOR_LINE=${2:-1}
CURSOR_COLUMN=${3:-1}
nvim -u NORC \
-c "map q :qa!<CR>" \
-c "terminal cat "<(cat)" - " \
-c "map i <Nop>" \
-c "set clipboard+=unnamedplus nonumber nolist showtabline=0 foldcolumn=0 laststatus=0" \
-c "call cursor($CURSOR_LINE, $CURSOR_COLUMN)"