DEV Community

Cover image for Terminal is your friend
Peter Vivo
Peter Vivo

Posted on • Edited on

4 2

Terminal is your friend

I work with javascript/typescript projects, some weird reason using terminal is significant part of my daily activity.

Sometime I almost forget which command are used. So I search which is the best way to document my important activity. My solution is extend any command with && echo :: <comment>. This is original bash solution, and easy to find by grep find below.



du -h -d 1 && echo :: size of directory


Enter fullscreen mode Exit fullscreen mode


history 0 | grep ::


Enter fullscreen mode Exit fullscreen mode

Alis can make your life easier. You can add following line to ~/.zshrc



alias h="history 0 | grep"

# or if use rg : rip-grep instead grep

alias h="history 0 | rg"


Enter fullscreen mode Exit fullscreen mode

then you can wirte for example h clone to list your git clone links.

I use mac so I installed near every program by brew, and this is also help to remember outer application.



brew list


Enter fullscreen mode Exit fullscreen mode


brew install zoxide


Enter fullscreen mode Exit fullscreen mode

Few words about zoxide: this is hyperspace navigation throught directory.

zoxide hyper speed cd command

After installed for example to ~\.zshrc by this:



eval "$(zoxide init zsh)"


Enter fullscreen mode Exit fullscreen mode

You can use as smart cd, for example I have repo directory so:



z re


Enter fullscreen mode Exit fullscreen mode

Repair/install code command on MacOS

My worst experience when I try to fix vscode code . command by manually, and accidental ower defined my $PATH so I cant use even the basic ls command. A litle bit hard to fix it the problem, so I wrote this line to remember.



sudo /Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron && echo :: VS Code with sudo rights for install 'code'


Enter fullscreen mode Exit fullscreen mode

VS Code SHIFT+COMMAND+P
vs code shift + command + P

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

This post blew up on DEV in 2020:

js visualized

🚀⚙️ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! 🥳

Happy coding!

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay