Skip to content

Instantly share code, notes, and snippets.

View lucassperez's full-sized avatar

Lucas Perez lucassperez

View GitHub Profile
@lucassperez
lucassperez / gist:bc04afa332c18ab708a084c1be1ff230
Created May 31, 2022 19:26
minimal zsh prompt with git colors
git_color() {
local git_status="$(git status 2> /dev/null)"
local output_styles=""
if [[ $git_status =~ "nothing to commit, working tree clean" ]]; then
# red
output_styles="9"
elif [[ $git_status =~ "nothing added to commit but untracked files present" ]]; then
# yellow
output_styles="11"
@lucassperez
lucassperez / intro.lua
Created April 2, 2026 04:54
Get the neovim intro from before 0.12
if vim.fn.argc() > 0 then
return
end
local vim_version = vim.version()
if vim_version.minor < 12 then
return
end
--[[