Last active
March 15, 2025 16:29
-
-
Save GeneralD/5fb6eee1bf99a6c2e1360305ec216af0 to your computer and use it in GitHub Desktop.
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 skim-gitignore() { | |
local api="https://www.toptal.com/developers/gitignore/api" | |
local gi=$(curl -sfL $api/list | tr "," "\n" | sk --query="$1" -m --preview "curl -sfLw '\n' $api/{} | bat --style=numbers --color=always --language='Git Ignore'") | |
if [[ $gi ]]; then | |
for prog in $(echo $gi); do; | |
curl -sfLw '\n' "$api/$prog" >> .gitignore; | |
echo "Added $prog to .gitignore"; | |
done; | |
fi | |
zle reset-prompt; | |
} | |
zle -N skim-gitignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment