#lookup #filename #stdout #stdin #correct

app devicon-lookup

Prepend the correct devicon to the beginning of each filename

8 releases (5 breaking)

0.8.0 Apr 1, 2020
0.7.1 Mar 28, 2020
0.7.0 Jun 4, 2019
0.6.0 Mar 25, 2019
0.1.0 Nov 18, 2018

#129 in Command-line interface

Download history 5/week @ 2021-02-20 7/week @ 2021-02-27 8/week @ 2021-03-06 7/week @ 2021-03-13 30/week @ 2021-03-20 22/week @ 2021-03-27 12/week @ 2021-04-03 25/week @ 2021-04-10 9/week @ 2021-04-17 23/week @ 2021-04-24 11/week @ 2021-05-01 11/week @ 2021-05-08 19/week @ 2021-05-15 2/week @ 2021-05-22 5/week @ 2021-05-29 13/week @ 2021-06-05

70 downloads per month

MIT license

1.5MB
286 lines

devicon-lookup

CircleCI Join the chat at https://gitter.im/devicon-lookup/community

devicon-lookup is a simple standalone CLI tool. It accepts text over stdin, and returns it stdout with a devicon prepended.

Use Cases

Uses cases include:

Prepending devicons to the files in your directory

ls | devicon-lookup --color

ls | devicon-lookup --color

Adding icons to grep results

rg test | devicon-lookup --prefix :

rg test | devicon-lookup --prefix :

Streaming results for large result sets

rg str --color always | devicon-lookup -c -p : | fzf --ansi

rg str -uuu --color always | devicon-lookup -c -p : | fzf --ansi

Installation

The recommended way to install is via cargo the Rust package manager

cargo install devicon-lookup

VIM Usage

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]

CLI Usage

 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=<delimiter>
   The filename is considered to be everything up to the given
   delimineter. The entire line is still output

   -r --regex=<regex>
   Regex used on each line to find the filename.
   Regex's must be valid based on the Rust `regex` crate
   The regex is expected to have a single capture group,
   which contains the filename. Extra capture groups are ignored

Further Reading

Blog post about the initial build and inspiration: https://coreyja.com/vim-fzf-with-devicons/

Dependencies

~2.2–3MB
~80K SLoC