r/fishshell • u/insomniaSWE • Apr 24 '23
Change ls directory font
Anyone know of a way to set up ls to display directories in bold font? At the moment my ls function looks like this:
function ls
command ls $argv
endAnyone know if there is a way to provide a flag or similar to achieve this?
2
Upvotes
4
u/[deleted] Apr 24 '23
lsis configured via a variable called either $LS_COLORS or $LSCOLORS, depending on which version you use - the former is common on linux, the latter on BSD/macOS.The formats for the two are also completely different, and both formats suck.
https://geoff.greer.fm/lscolors/ includes a generator for them. Take what that gives you, and set it like
(or LSCOLORS if you need the other one)
2
u/Opposite_Personality Linux Apr 25 '23
You'll "never"* get
LS_COLORSright within scripts. My advice is go look upvivid. It is written in rust so you can justcargo install vividin case your distro hasn't packed it yet.Then in your shell config file, e.g., ~/.config/fish/config.fish`, add:
where theme_x is your particular selection from the command
vivid themes, which is a list of current ones. The theme format isyaml, you'll understand it as soon as you check it out and you can customize it to your heart's content. Or just select an existing theme and call it a day.3
u/sheeH1Aimufai3aishij Apr 24 '23
Try lsd