Skip to content

Instantly share code, notes, and snippets.

View jonathan-meyer's full-sized avatar

Jonathan Meyer jonathan-meyer

View GitHub Profile
@jonathan-meyer
jonathan-meyer / fish_prompt.fish
Created August 29, 2023 22:09
Fish Git Prompt
function fish_prompt --description 'Write out the prompt'
set -l last_pipestatus $pipestatus
set -lx __fish_last_status $status # Export for __fish_print_pipestatus.
if not set -q __fish_git_prompt_show_informative_status
set -g __fish_git_prompt_show_informative_status 1
end
if not set -q __fish_git_prompt_hide_untrackedfiles
set -g __fish_git_prompt_hide_untrackedfiles 1
end
console.log(
[1, "2", 3, 4, "5", true].reduce((p, c, i, a) => {
if (p === null) {
p = Math.floor(Math.random() * a.length);
}
if (typeof p !== "object") {
if (i === p) {
p = [c];
}