-
-
Save monakez/00cfa58c3a4020d074d68001dcd204a1 to your computer and use it in GitHub Desktop.
A vim wrapper that allow you to use it for a pager, man reader, etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -eu | |
| cache_file="/tmp/pager.cache" | |
| [[ ! -p "$cache_file" ]] && touch "$cache_file" && trap "rm $cache_file" 0 | |
| cat > "$cache_file" | |
| vim -R -c "terminal cat $cache_file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment