This saves some keystrokes and unnecessary frustrations.īrilliant. You’ll know whether you’re typing anything wrong before you hit enter. It shows you whether your command exists before you even hit enter. This was something I never saw before, until today. It can even give you suggestions from the man page. These suggestions are in gray.įish knows about paths and options. On first glance, Fish stands out because it comes with these two features out of the box:įish suggests commands as you type. You can still create aliases, write functions, export variables, and run commands. Functionally (again), there’s nothing much different between Fish, Bash, or Zsh. ZSH_THEME = " avit " Fishįish (again) is another shell. Here’s how my shell looks today (with the avit theme). You can also include plugins to make Bash-ing easier than before! You can find out more about the themes here. Oh-my-zsh let you switch between built-in themes by changing one line of code. You can change the theme and colour of your shell without much programming capabilities.Īll we had to do was install a “package manager” of sorts called oh-my-zsh. What Zsh brings to the picture is colour customisation. You can also create aliases, make functions, export variables, and run commands. Zshįunctionally, there’s nothing different between Zsh and Bash. I have no idea how to do it (nor do I have the programming chops and patience to try this for myself). Some people managed to make Bash shells look amazing. You can create aliases, make functions, export variables, and run commands. If you open up a Terminal on Mac, or if you used Linux before, you’ve seen Bash. I want to share which one I chose and how I went about setting it up. But how would Fish fare? I’ve heard great things about it, so I tried it out. The three main ones out there are Bash, Zsh, and Fish. In case you are using fish shell add this line to your ~/.config/fish/config.When I set up my computer, I had the chance to take another look at the shell I’m using. zshrc: export MANPAGER="sh -c 'col -bx | batcat -l man -p -theme 'Monokai Extended''" I love the Monokai theme and therefore I added this command into my. Install this bat package sudo apt install bat In this repository and still needs some work. If you prefer to have this bundled in a new command, you can also use It might also be necessary to set MANROFFOPT="-c" if you experience MANPAGER environment variable: bash export MANPAGER="sh -c 'col -bx | batcat -l man -p'" īat package is available on Ubuntu since 20.04 ("Focal") and Debian since August 2021 (Debian 11 - "Bullseye")and its command is batcat which is a cat replacement with wings.īat can be used as a colorizing pager for man, by setting the I suggest a very nice tool called batcat provided by. #set -x LESS_TERMCAP_ue (set_color normal) #set -x LESS_TERMCAP_us (set_color -underline) #set -x LESS_TERMCAP_se (set_color normal) #set -x LESS_TERMCAP_so (set_color -reverse) Set -x LESS_TERMCAP_me (set_color normal) Set -x LESS_TERMCAP_md (set_color -bold red) # converted to Fish shell syntax thanks to this page: # based on this group of settings and explanation for them: This is my version of the wrapper function: ~/.config/fish/functions/man.fish function man -description "wrap the 'man' manual page opener to use color in formatting" The whole process is to create a new file at ~/.config/fish/functions/man.fish, and inside it define a function man that sets the necessary environment variables, then calls the original man using command, passing in arguments using $argv. If you want these colors to be added only when viewing man pages, not for everything you view in less, you should set these variables in a wrapper function for man instead of putting them in your config.fish.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |