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 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 |
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
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]; | |
} |