There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

thingsiplay ,

What you are looking for is called Syntax Highlight. Are you asking this for the terminal? I think this is a property of the shell. Fish has it builtin and for ZSH, there is a plugin: github.com/zsh-users/zsh-syntax-highlighting I don’t know if its possible with Bash.

bubstance ,
@bubstance@lemmy.sdf.org avatar

Closest thing for bash would be https://github.com/akinomyoga/ble.sh.

Binette OP ,

Tried it out and it works! Thanks!

Binette OP ,

Yes, I am looking for a syntax highlighter for the terminal. The one I use is called Kitty.

leo85811nardo ,

If you use zsh, there is zsh syntax highlighting plugin. For bash, a cursory search gave me ble.sh which looks interesting. And as other threads have mentioned, fish shell has this built in, but beware fish shell syntax works drastically differently from other POSIX shells

boredsquirrel ,
@boredsquirrel@slrpnk.net avatar

Fish shell

You can change the used shell in the configs. At least for Alacritty, when I used it (dont care, it was still kinda broken, I just use Konsole)

CsXGF8uzUAOh6fqV ,
@CsXGF8uzUAOh6fqV@lemmy.world avatar

Interesting, I never heard of setting your shell in the emulator config. I just used ‘chsh’ once when I setup the install.

boredsquirrel ,
@boredsquirrel@slrpnk.net avatar

Yeah please dont use chsh.

Zsh may work, dash (which is a faster, smaller reimplementation of bash) may work.

But fish absolutely doesnt.

Just because you want to have a nice writing experience, that doesnt mean your whole OS needs a different shell.

I will experiment with dash though. Ubuntu uses it as the root shell, so it is really well tested.

priapus ,

What do you mean by won’t work? chsh is not changing the shell of the entire OS, it’s changing your users login shell. Unless you’ve done something to make your login break without bash, this is completely fine. Using chsh is even how the Fish docs recommend setting it as your default.

What Ubuntu did isnt about login shells, they replaced /bin/sh with dash, meaning any scripts that try to use sh will instead use dash.

sparr ,

please dont use chsh

doesnt mean your whole OS needs a different shell

chsh just changes the shell when you log in to a shell. all the other shells are still available and usable. any script starting tieh #!/bin/bash will still run with bash, even if you’re using zsh or fish.

skullgiver ,
@skullgiver@popplesburger.hilciferous.nl avatar

Powershell does this on Windows. May also work on Linux?

I think there’s a zsh script that does this as well but I can’t remember the name of it.

gamma ,
@gamma@programming.dev avatar

zsh-syntax-highlighting

There’s also a fork called fast-syntax-highlighting, I use it.

Bruhh ,

Fish

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines