dotfiles

Dash Eclipse's dotfiles
git clone git://ezup.dev/dotfiles.git
Log | Files | Refs | README | LICENSE

commit 6993865d994ed7aea876aa0a18c9f640da2b5246
parent 872ab7eb62b8335bb49ebbfd4cb515d0b581dbd0
Author: Dash Eclipse <dash@ezup.dev>
Date:   Wed, 14 Oct 2020 19:46:02 +0000

Add sgview()

Diffstat:
M.zshrc.local | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/.zshrc.local b/.zshrc.local @@ -86,3 +86,14 @@ fxls() { --bind 'alt-h:execute-silent[ xdg-open "$(xbps-query -p homepage -R {1})" & ]' \ ${1:+--query "$@"} } + +# stagit viewer +sgview() { + [ -z "$1" ] \ + && local URL=$(read -e "?URL: ") \ + || local URL=$1 + curl --progress-bar "$URL" \ + | sed -n 's|<a href="#.*" class="line" id=".*">.*</a>||p' \ + | recode html..ascii \ + | bat -n +}