Skip to content

Instantly share code, notes, and snippets.

@monakez
Forked from RichardBronosky/less
Created December 21, 2022 12:22
Show Gist options
  • Save monakez/00cfa58c3a4020d074d68001dcd204a1 to your computer and use it in GitHub Desktop.
Save monakez/00cfa58c3a4020d074d68001dcd204a1 to your computer and use it in GitHub Desktop.

Revisions

  1. @RichardBronosky RichardBronosky created this gist Mar 4, 2021.
    7 changes: 7 additions & 0 deletions less
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/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"