The How-To Geek has a brief overview of zsh’s advantages, like automatic cd, where you can simply type a directory name to navigate to it, and built-in spell-check. Zsh also supports plug-ins, which enables things like the popular Oh My Zsh, which adds even more features and makes advanced configuration easier. Super fast OSX Terminal with zsh and oh-my-zsh. Time to be a Linux hero. Time for practice. Lots of practice. I intend for this post to save you slow zsh Mac OSX Terminal users many hours of time and suffering. I wonder if oh-my-zsh is going to fix this slow OSX Terminal with oh-my-zsh with some sort of theme standardization and theme warning. Oct 16, 2019 Once I moved to Mac, I changed my shell to use zsh using Oh My Zsh due to the rich experience it brings to the terminal. I was delighted to see all these themes and plugins, and then started looking for a theme that provided the same information posh-git prompt provided. MacOS zsh Completions. Some zsh completion files for macOS specific commands and third party tools. Pull requests and contributions are welcome! Setup and Installation. To use mac-zsh-completions on your Mac, follow these steps: download the project zip or git clone the project.
The era of .NET developers being constrained on using only Windows as a platform is gone. (At least for ASP.NET). That might be very cool to some, but also scary for others. Fear of change is true. Nevertheless, it's definitely time (if not yet) to get out of the comfort zone and get your feet wet. Being able to work with .NET on Linux/Mac is one of the points that makes me agree 100% with Nick Craver that .NET Core is the future.
After reading Scott Hanselman's blog post last week, I decided to setup WSL on my laptop. If you don't know what Windows Subsystem for Linux is (WSL from now on in this post), I recommend reading this before.
The TL;DR of that link is:
WSL lets developers run Linux environments -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a virtual machine.
While setting it up on my machine was very easy, I didn't want to stay with the boring Windows bash shell. Guys at work use Mac's with oh-my-zsh and boy that made me pretty jealous. It was not that straightforward to make it all work though. So hopefully, this post will help me and others in the future. Here's what we are going to do:
- Enable WSL on Windows 10
- Install zsh + oh-my-zsh
- Configure zsh and oh-my-zsh
- Change Themes and colors
- Adding Bash on Ubuntu task in ConEmu*
Enable WSL on Windows 10
This is pretty straightforward to set up, Just follow the instructions here to get Ubuntu running. After you are in, update the packages, by running:
sudo apt-get update
. When all is working, you can continue to the next step.Installing zsh
Open the Ubuntu app installed from the App Store. We will now install zsh:
![Mac Mac](https://ohmyz.sh/img/github-fork-banner.png)
After installing it, type
zsh
. zsh will ask you to choose some configuration. We will do this later on while installing oh-my-zsh
, so choose option 0
to create the config file and prevent this message to show again.Installing oh-my-zsh
Before all we need to have
git
installed:Nov 28, 2016 Aiseesoft Mac FoneLab Free to try Recover lost/deleted SMS, photos, contacts, Notes and videos from iOS devices, iTunes/iCloud backup. ![Ireboot for mac Ireboot for mac](https://i0.wp.com/softwareformac.net/wp-content/uploads/2019/03/ReiBoot-Pro-7.2.6.3-Mac-Torrent-Free-Download-2.jpg?resize=600%2C372&ssl=1)
![Ireboot for mac Ireboot for mac](https://i0.wp.com/softwareformac.net/wp-content/uploads/2019/03/ReiBoot-Pro-7.2.6.3-Mac-Torrent-Free-Download-2.jpg?resize=600%2C372&ssl=1)
Then, use
curl
to install oh-my-zsh:This will clone the repo and replace the existing
~/.zshrc
with a template from oh-my-zsh
.Configuring zsh/oh-my-zsh
Oh My Zsh Macports
First, we need to make sure
zsh
is executed by default for Bash on Ubuntu. This is not mandatory, but if not done you need to type zsh
every time. For this, edit the .bashrc
file with nano: nano ~/.bashrc
and paste this right after the first comments:Save it
Ctrl + shift X
and restart your Ubuntu shell. You should be on zsh by default now.Changing the Theme of oh-my-zsh
oh-my-zsh has several nice Themes. It's worth checking them out. For this tutorial, I'm going to use the awesome agnoster.
Edit the
~/.zshrc
again with nano: nano ~/.zshrc
:![For For](https://blog.mordsgau.de/wp-content/uploads/2018/02/oh-my-zsh-agnoster.png)
Save it and restart your Ubuntu shell again.
Now was the tricky part while I was doing this on my laptop. After installing the theme, I got a totally broken shell (as shown in the image), with weird fonts and missing icons. That was expected due to missing Powerline Fonts, but even after installing them on Ubuntu the Theme was still broken. I tried several things and couldn't make it work. Since we will run it with ConEmu, I didn't want to spend more time on it. The Ubuntu shell is very limited anyway so. not a big deal.
Installing missing Powerline Fonts
We need to install the Powerline fonts in our Windows to make the agnoster theme work. Follow these steps:
- Clone the powerline repository on Windows
- Open an admin PowerShell, navigate to the root of the repo and run this:
This will install all the fonts on your Windows. You might get an error from PowerShell blocking you from running the script. Check this out if it happens with you. Make sure to reverse the policy after.
Changing directory colors
The directory colors for zsh is awful. If you followed along, by now you should have an ugly yellow or dark blue background on folders when
ls/ll
. Luckily, we can change that by installing a Solarized Color Theme from here. Follow these steps:- Pick a theme from the GitHub repo (I'm using dircolors.ansi-dark since I use a dark shell).
- Download the file making sure to put it in the user's home:
Oh My Zsh For Mac
- Edit your
~/.zshrc
and paste this:
We have nice colors now :)
Setting Bash on Ubuntu task in ConEmu
Open ConEmu, and go to
Settings
. Navigate on the left-menu: Startup > Tasks
. There, click at the +
button at the bottom.- Add a name for the task. Anything will suffice. I used
bash::ubuntu
to group Ubuntu into the bash tasks. - On
Task parameters
choose an icon for the task. I picked the Ubuntu icon app that is buried under some very long path. but any .ico will work. You can leave it blank if you don't care. - For the
command
use this%windir%system32bash.exe ~ -cur_console:p
. This will start bash under the user home directory. Since we already configuredzsh
to run by default, this is enough.
Install Oh My Zsh
Open the new task on ConEmu and.. Voalá!
Nice command look, lots of git shortcuts and much more productivity. Couldn't enjoy this more.
Additional links
Here are a few other things you might want to look:
- oh-my-zsh cheatsheet: Lots of commands to improve your productivity
- Colors page on ConEmu: How to change ConEmu color scheme (If you liked mine, I'm using Solarized (Luke Maciak) with Meslo LG M DZ for Powerline console font)
- Understand why you're not supposed to touch Linux files using Windows apps: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/
Would be cool to see what other things you use on your setup. Just let me know in the comments!
What you need
- Oh My Zsh
- Powerline fonts
- Oh My Zsh theme
- iTerm color palette
Install
Oh My Zsh Macos Install
- Edit the theme to include your user name
- Find and replace
<username>
with your alias
- Find and replace
- Copy theme to Oh My Zsh's theme directory
cp xshay.zsh-theme ~/.oh-my-zsh/themes/
- Install powerline fonts
- Mac
- Install like any other font
- *nix
- Copy Powerline fonts to your system fonts directory
sudo cp *.otf /usr/share/fonts/opentype
- If the directory does not exist, create it
- Refresh system font cache
sudo fc-cache -fv
- Copy Powerline fonts to your system fonts directory
- Mac
- Edit
~/.zshrc
to use newxshay
theme - Update font settings to use a Powerline font
- iTerm
Preferences -> Profiles -> Text -> Change Font
- iTerm
- Change your color palette
- iTerm
Preferences -> Profiles -> Colors -> Load Presets
- iTerm