Using the Oh My Zsh template file and adding it to ~/.zshrc. Then restart iTerm2 to experience the new world of Oh My Zsh. Read the script over to ensure it's safe, and then execute it: $ zsh omz_installer.sh Install Oh My Zsh with: $ curl -fsSL -output omz_installer.sh Autocomplete, jump between options with Tab, and press Return to make a selection works with directories, files, and commands.History substring search and accessing specific lines by running the history command with ! followed by its line number e.g., !137.Spelling corrections, approximate completion, and automatic correction when you make a minor mistake typing a directory name.Recursive path expansion (for example, /u/lo/b expands to /user/local/bin after pressing the Tab key).With the Z plugin, quickly change to another path by naming the folder rather than the complete path.List all alias commands with alias or filter them with grep for example, alias | grep git.Switch between the last and current path with a hyphen.Instead of the mkdir and cd commands, use the take command to create a directory and change the path to it.(parent from parent dir), / (root), or ~ (home). Instead of the cd (change directory) command, navigate directories with just.It modernizes the terminal with simple solutions for managing your zsh configuration. Oh My Zsh is a delightful open source framework for Z shell that can be used on GNU Linux and macOS computers. Free online course: RHEL technical overview.By echoing the zeroth argument of your command, designated by the variable $0, you can learn what shell you're interfacing with. You can verify the shell you're running with the echo command. Set zsh as your default shell by running the following command in iTerm2, and then relaunch the terminal: $ chsh -s /bin/zsh Or your default package manager on Linux: $ sudo dnf install zsh If you don't have Z shell installed, you can install it with Homebrew on MacOS or Linux: $ brew install zsh Test whether you already have Z shell installed: $ zsh -version If you're on Linux, the default terminals (such as GNOME terminal, Konsole, XFCE terminal, or similar) match or exceed the features of iTerm2, so you can use whatever you already have installed. Or, you can download and install iTerm2 from its website and drag and drop the file into your Application folder. Install iTerm 2 with Homebrew using: brew cask install iterm2 I really enjoy it because of its many great features, including search, autocomplete, paste history, and thousands of helpful functions, helpers, plugins, themes, and a few things that may make you shout with joy. If you get an error on MacOS, run xcode-select -r to reset xcode-select.įor more information about Homebrew, read Matthew Broberg's article Introduction to Homebrew: the painless way to install anything on a Mac. Once you're comfortable with what the script is going to do, you can safely execute it: $ bash homebrew_installer.sh Then install Homebrew by entering this command in a macOS terminal or Linux shell prompt: $ curl -fsSL -output homebrew_installer.sh \īefore executing an install script on your system, review it to ensure it's not malicious: $ more homebrew_installer.sh Install Xcode tools with: xcode-select - install Before you can install Homebrew, you must install the Xcode tools (or the complete version of Xcode, if you prefer). Homebrew is the easiest way to install and manage utilities on a Mac. If you're a Linux user, you can read this article about themes and plugins for Zsh. If you're a Mac user and would like to try it, follow along with this how-to. In this article, I'll explain how I customize my macOS Z shell (zsh) terminal with iTerm2, Oh My Zsh, and Powerline10k. This makes it important that you set up your terminal in ways that improve your productivity and decrease your frustration. The command line is an important part of every developer's workflow.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |