Skip to content

Instantly share code, notes, and snippets.

@dedelala
Created February 27, 2018 23:34
Show Gist options
  • Save dedelala/f5b5e80153083fdd5a9c7bfcc549c9eb to your computer and use it in GitHub Desktop.
Save dedelala/f5b5e80153083fdd5a9c7bfcc549c9eb to your computer and use it in GitHub Desktop.
a color swatch for figuring out your zsh prompt
#!/bin/zsh
echo -n " "
for i in $(seq -f "%03g" 0 255); do
s="%K{$i} %k%F{$i} $i%K{0} $i%K{16} $i%k%f "
echo -n ${(%)s}
if [[ $i -gt 0 ]] && [[ $(( ($i - 3) % 6 )) == 0 ]]; then
echo
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment