4 ms·
You could also put a shell script on your `PATH` instead of creating an alias: #! /bin/sh query_string="q=$@" curl --get \ --header 'Accept: text/pla
by harryvederci 5y ago
You could also put a shell script on your `PATH` instead of creating an alias:
#! /bin/sh
query_string="q=$@"
curl --get \
--header 'Accept: text/plain' \
--url https://dontbeevil.rip/search \
--data-urlencode "${query_string}"
- mrlemke 5y agoI'd do it almost the same but without the variable. Note: the long shebang is for using on Termux, PC users should change it to something like #!/use/bin/env sh. #!/data/data/com.termux/files/use/bin/env sh curl -G -H "Accept: text/plain" \ --url "https://dontbeevil.rip/search" \ --data-urlenconde "q=$*"
- harryvederci 5y agoDidn't know about "$*", thanks! Edit: typo in your version: "urlenconde"