The execution is really nice!
But,there are already browsers and web guidelines to make this possible without specific single purpose apps.
Why would I use this over for example, Lynx?
But,there are already browsers and web guidelines to make this possible without specific single purpose apps.
Why would I use this over for example, Lynx?
$ alias wiki='f(){ w3m -F "https://en.wikipedia.org/w/index.php?search=${1}&title=Special:Search&ns0=1"; unset -f f; }; f'
$ wiki pandas
This seemed to work well for me.A tab to the wikipedia search page bookmarked would work well too and could be used in existing w3m/lynx session.
$ alias crate='f(){ w3m -F "https://lib.rs/search?q=${1}"; unset -f f; }; f'
$ crate rocket
(lib.rs is a crate index using rust as the server instead of javascript, and has advantage of working well with terminal browsers)Aside from that, no benefit really that I can think of.
So yes, to be clear to anyone else you can just put:
wiki(){ w3m -F "https://en.wikipedia.org/w/index.php?search=${1}&title=Special:Search&ns0=1"; }
in your .bashrc - and if you're me you just forget how you defined it and you have to cat it every once in a while :)Oh, and you might be entertained by this silly alias adapted from an IOCC entry...
$ cstdin
printf("Hello World\n");
Hello World
alias cstdin='gcc -pedantic -ansi -Wall -o ~/.stdin ~/.stdin.c -lm && ~/.stdin'
$ cat ~/.stdin.cc
#include <stdio.h>
<snip many headers>
int main(int argc, char **argv)
{
#include </dev/tty>
return 0;
}
I'm sure it would also make way more sense as a dedicated script. I have a C++ one in there too.