a command line utility for using the DUckDuckGo search engine.
"ddgr is a command-line tool to search DuckDuckGo. ddgr shows the title, URL and text context for each result. Results are fetched in pages. Keyboard shortcuts are available for page navigation. Results are indexed and a result URL can be opened in a browser using the index number. There is no configuration file as aliases serve the same purpose for this utility. Supports sequential searches in a single instance.
"
—the man page
You might well ask "why"? A fair question. I probably spend more time than most running things at the command line; I use a lot of command line tools and I frequently have questions about how to do a particular thing, and the man pages don't always answer my questions, so i need to search the web. Now whilst DUckDuckGo has useful tools that make browser use easy, sometimes it's just easier to not have to switch to that window, open a new tab ad start a search. Call it laziness, call it optimal keyboard-fu, but once in a while, just typing "ddgr fzf set up preview" and having the ability to select a search result, is really nifty.
The output looks like:
1. 4 Useful fzf Tricks for Your Terminal | Pragmatic Pineapple pragmaticpineapple.com
The plugin basically "plugs in" fzf into your default tab completion. I
suggest you try it out. 4. Preview Files Before Selecting Them. Another
cool thing to try out is the preview feature of the fzf. It allows you to
preview files before you open them. To access it, you need to pass
--preview-to fzf. Let's see it in action:
2. junegunn/fzf: :cherry_blossom: A command-line fuzzy finder - GitHub github.com
Package Manager Linux Distribution Command; APK: Alpine Linux: sudo apk
add fzf: APT: Debian 9+/Ubuntu 19.10+ sudo apt install fzf: Conda: conda
install -c conda-forge fzf
3. A Practical Guide to fzf: Building a File Explorer - The Valuable Dev thevaluable.dev
These values can also be used for the placeholder in fzf's preview; we'll
see that in another section of this article. Customizing fzf Display. Now
that we have a good grasp of fzf's basics, let's see how we can customize
its display. We can do a lot in that regard; for example, here are a
couple of options we can use, to give you an ...
4. A Practical Guide to fzf: Shell Integration - The Valuable Dev thevaluable.dev
Said differently, if you already give a value to FZF_TMUX_OPTS, there is
no need to set FZF_TMUX to 1; keybindings and completion will always open
in a new tmux pane in that case. There's even a short man page you can
read: man fzf-tmux. The most noticeable option is -p, to open fzf in a
tmux floating pane. You can try it by yourself easily:
5. Using FZF to Preview Text Files on the Command Line and within Vim nickjanetakis.com
FZF is extremely useful on the command line to reverse search your
history with CTRL+r. I've made a video about that a few years ago, but
FZF can also fuzzy find files using CTRL+t.. You can take this one step
further to have FZF recursively find all files in a directory and then
you can quickly preview them with paging support .
Now i can select the search result that looks most promising, by typing a number at the prompt, and lo! my browser opens with that page. SO easy. No need to reach for the bloody mouse and I get to keep my fingers on the keyboard. I've always preferred keyboard use over mouse or (God forbid!) a trackpad. Nothing to reach for or find on my desk, just a smooth flow. Does it save time? Produce better results? Make me a more effective person? Nope, none of the above. It just preserves my sanity and helps me maintain my sysadmin cosplay aura better.
if you're a real sysadmin, try this tool; seriously its made my life less frustrating. It seems to be available in most distros, and in homebrew if you're an Appler. I can't think of any reason why Windows users are left out provided they've set up WSL.
$ xclip -o | wc -w