Giter VIP home page Giter VIP logo

devicon-lookup's Introduction

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

Upgrading

Upgrading can also be done via cargo. The following command will install the latest available version on devicon-lookup

cargo install devicon-lookup --force

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/

devicon-lookup's People

Contributors

coreyja avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar gitter-badger avatar kevinrambaud avatar nifoc avatar ri-aje avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.