zsh/browser.zsh
2023-07-12 08:47:40 +02:00

11 lines
497 B
Bash

#! /bin/zsh
# shellcheck shell=bash
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/$*"; }
alias mdw=mdw.sh