-
-
Save ranyitz/f15aaecd0ac6f1f7a87a3910c08d1adc to your computer and use it in GitHub Desktop.
CLI equivalent to the `t` command in GitHub that opens the file finder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function t() { | |
| FILES=($(rg --files --hidden --glob '!.git' | fzf --exit-0 --reverse --multi)) | |
| [[ $FILES ]] && code $FILES --folder-uri=$(git rev-parse --show-toplevel) | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fuzzy file finder that opens vscode
Features
.gitdirectory.gitignore<tab>)Prerequisites
codecommand in PATH - https://code.visualstudio.com/docs/editor/command-line#_code-is-not-recognized-as-an-internal-or-external-commandfzfinstalled - https://github.com/junegunn/fzf - fuzzy finderripgrepinstalled - https://github.com/BurntSushi/ripgrep - search toolInstallation
Paste this function in your
.zshrc/.bashrcfileInspiration
t keyboard shortcut on github docs