devicon-lookup
is a simple standalone CLI tool.
It accepts text over stdin, and returns it stdout with a devicon prepended.
Uses cases include:
ls | devicon-lookup --color
rg test | devicon-lookup --prefix :
rg str --color always | devicon-lookup -c -p : | fzf --ansi
The recommended way to install is via cargo
the Rust package manager
cargo install devicon-lookup
Upgrading can also be done via cargo
. The following command will install the latest available version on devicon-lookup
cargo install devicon-lookup --force
The primary real world usage of this tool is within VIM
and specifically with fzf
.
For more information about one possible solution to integrating these see the fzf.devicon.vim
repo.
This repo is a fork of fzf.vim
that uses this tool to add devicons to the fuzzy search results
(fzf 💜 devicon ❤️ vim)[coreyja/fzf.devicon.vim]
``` Dev Icon Lookup
Usage: devicon-lookup [options] devicon-lookup (-h | --help) devicon-lookup --version
Options: -h --help Show this screen.
--version Show version.
-c --color Strip ANSI color codes from each line before processing them The original string with ANSI codes preserved is output
-p --prefix=
-r --regex=regex
crate
The regex is expected to have a single capture group,
which contains the filename. Extra capture groups are ignored
```
Blog post about the initial build and inspiration: https://coreyja.com/vim-fzf-with-devicons/