-
-
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 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) | |
} |
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
.git
directory.gitignore
<tab>
)Prerequisites
code
command in PATH - https://code.visualstudio.com/docs/editor/command-line#_code-is-not-recognized-as-an-internal-or-external-commandfzf
installed - https://github.com/junegunn/fzf - fuzzy finderripgrep
installed - https://github.com/BurntSushi/ripgrep - search toolInstallation
Paste this function in your
.zshrc
/.bashrc
fileInspiration
t keyboard shortcut on github docs