zsh/browser.zsh
2022-05-05 21:21:11 +02:00

10 lines
506 B
Bash

#! /bin/zsh
function escape() { perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$@"; }
function duckduck() { elinks -dump "https://duckduckgo.com/?q=$(escape "$@")"; }
function google() { elinks -dump "https://www.google.de/search?q=$(escape "$@")"; }
function wetter() { curl --tr-encoding -H "Accept-Language: ${LANG%_*}" "https://wttr.in/$*"; }
function wetter2() { curl --tr-encoding -H "Accept-Language: ${LANG%_*}" "https://v2.wttr.in/$*"; }
function mdw() { pandoc "$@" | w3m -T text/html }