DEV Community

Cover image for CLI Love Inside ❤️

CLI Love Inside ❤️

Boris Jamot ✊ / on August 16, 2018

The command line is a powerful tool, and sadly forsaken by most of us. The goal of this post is to reconcile some of you with the CLI (Command ...
Collapse
 
dreamtigers profile image
Ivan Gonzalez

An alternative to colorman with more options: fish-colored-man.

Btw, can you share your colorscheme? I took the liberty to look for it in your dotfiles repo but couldn't find it. Thanks for the post!

Collapse
 
tbodt profile image
tbodt

I use Neovim's man page viewing functionality for this. $MANPAGER is set to nvim -c 'set ft=man' -.

Collapse
 
dreamtigers profile image
Ivan Gonzalez

I had no idea neovim had such a functionality. Just tried and looks really nice! Nice enough to really make me consider change to it. Thanks!

Collapse
 
biros profile image
Boris Jamot ✊ /

You mean my colorscheme for colorman ? I don't have one.
It's the default colors of the plugin.

Collapse
 
dreamtigers profile image
Ivan Gonzalez

No, I mean the terminal colorscheme, the one you see in, for example, your first gif.

Thread Thread
 
biros profile image
Boris Jamot ✊ /

The terminal in the gif is deepin-terminal with the default colorscheme as it's not customizable with this term.
But I think that what you're asking for is my prompt: neolambda for fish shell.

Thread Thread
 
dreamtigers profile image
Ivan Gonzalez

Thanks a lot!

Collapse
 
katafrakt profile image
Paweł Świątkowski

I've been using ZSH for ages (but recently without oh-my-zsh) but I keep hearing good things about fish. Do you know any decent comparison article? Maybe I'll try it.
My main worry is that quick oneliners would not work there as they used.

Collapse
 
biros profile image
Boris Jamot ✊ /

I used zsh a long time ago when I was a student. It was more user-friendly than bash.

But as I didn't use since more than 15 years, I couldn't say more about the comparison with fish.

Recently I've installed zsh + oh-my-zsh as a POSIX alternative to fish, but it seems that many native features of fish (auto-completion, coloration, ...) have to be configured manually in zsh (through plugins or conf file).

Fish works great out of the box!

Collapse
 
katafrakt profile image
Paweł Świątkowski

Actually I don't like autocompletion. It can reveal far too much when you are for example showing something for larger audience ;) So having that built-in in fish does not count for me as better. But I guess I'll give it another shot some time soon.

Thread Thread
 
biros profile image
Boris Jamot ✊ /

I get your point :)
But the real strength of fish is its ability to auto-complete commands and sub-commands, for example for git (branch , docker stop , ...). It's really powerful !

Collapse
 
tux0r profile image
tux0r

Note that sometimes having colors in your prompt will break when connecting over SSH (e.g. PuTTy on Windows) ... :-) I have decided to use a uncolored standard prompt for this very reason.

re: CLI tools, jarun has some nice ones, mostly written in Python.

Collapse
 
dangolant profile image
Daniel Golant

Does that apply to using docker-compose exec locally? When I try to run docker-compose exec tail -f log/development.log | jq I "Invalid numeric literal at line 1, column 11"

Collapse
 
j_mplourde profile image
Jean-Michel Plourde

I try to learn more and more about how to use the CLI. My dev laptop that I use for university assigments runs Linux. I recently switch to zsh with ohmyzsh. I downloaded a popular theme which enables many useful visual cues. It has a solid auto completion and suggestion, besides many other useful features.

Collapse
 
tunaxor profile image
Angel Daniel Munoz Gonzalez

Fish is one of my favorite shells! nice to see it mentioned. great collection of resources by the way!

Collapse
 
biros profile image
Boris Jamot ✊ /

Have a look at spacefish, it's crazy fish theme with integrations with many, many languages and tools !

Collapse
 
tunaxor profile image
Angel Daniel Munoz Gonzalez

Will do! thanks

Collapse
 
moopet profile image
Ben Sinclair

colorls [...] makes the file sizes human readable

Regular ls does this with the -h flag. In fact, so do a lot of CLI apps, like du and df for example.

Collapse
 
iberianpig profile image
Kohei Yamada

try best tig integration for vim.
github.com/iberianpig/tig-explorer...

Collapse
 
lyfolos profile image
Muhammed H. Alkan • Edited

There are much fish ((f)riendly (i)nteractive (sh)ell) users because of the autocompletion, syntax highlighting etc. But actually fish is much less compatible with other shells. For example, ZSH & Bash are really similar, and they can interop with "many" scripts. You can get similar features using plugins. I do not think there is a reason to use fish.

Collapse
 
biros profile image
Boris Jamot ✊ /

I use both fish and bash. Fish is my term shell and bash is my scripting shell.
I agree with you on fish not being compliant with bash and other bourne shells. That's because fish isn't 100% POSIX compliant.

Collapse
 
richjdsmith profile image
Rich Smith • Edited

I actually just tried the Fish shell this past week and while I absolutely loved how it had somany great tools right out of the box, I ended up having to go back to my old trusty ZSH + Oh-My-ZSH combo.

Because fish isn't fully bash compatible (commands like && don't work.) it broke many plugins I rely on in in VSCode, as well as a few ruby cli tools I use.

I loved it, but the headache and hassle just wasnt worth it.

To get most of the same gains, I just use ZSH + Oh-My-ZSH + Spaceship ZSH.

Everything just works.

Collapse
 
biros profile image
Boris Jamot ✊ /

Yes, spaceship is also great with fish. I love their prompt !

Collapse
 
vishal423 profile image
Vishal Mahajan

could you share the fonts configured on your setup to properly display Unicode characters like \uE74E and \uE749 ?

Collapse
 
jhspetersson profile image
jhspetersson

What do you think about fselect to search files with SQL-like queries?

Collapse
 
biros profile image
Boris Jamot ✊ /

It seems powerful but I don't use so much file search in my every day tasks.

Collapse
 
ondrejs profile image
Ondrej

Fantastic article, thank you for inspiration!

Collapse
 
mattmattv profile image
Matthieu Vion

Maybe TermToSVG could be also mentioned to record some terminal sessions !

The main advantage/disavantage is it output the session as an animated SVG !

Collapse
 
hiredgun profile image
hiredgun

What powerline font is used in the example:
Powerline

Collapse
 
biros profile image
Boris Jamot ✊ /

It's monaco-powerline.

Collapse
 
bdmorin profile image
Brian

Check out lnav for logfiles

Collapse
 
biros profile image
Boris Jamot ✊ /

Thanks, I'll have a look on it !

Collapse
 
paoloantinori profile image
Paolo Antinori

This one highlights keywords you specify in a command output:

github.com/paoloantinori/hhighlighter