Customized MacShell

Go forward and never give up!
Black Apple has been used for nearly half a year, and I am slowly getting used to using the mac operating system. However, before I did not really play the efficient side of mac, but just stayed at the most basic use, in order to use mac more efficiently, I recently collected some examples of efficient and elegant use of mac, ready to practice Make some records.
How to use Mac efficiently? Faced with this problem, we can start by discussing how to use the shell gracefully (that is, the terminal). First of all, I have to say that the shell function that comes with mac is already very powerful, but in order to work better, we can do a lot. This article will introduce several Mac enhancements (plugins) for Mac, making Macshell even more powerful.

iterm2

Installation is relatively simple, the official website to download an installation package.

Usage

Smart selection:

  • Double-click the selected string;
  • Three strokes select the entire line;
  • Four-click smart selection;

  • You can drag and drop the selected string;

  • Click url to call the default browser to access the URL;

hot key:

oh my zsh

The shell we usually use on mac is usually bash-shell, and mac and linux have another shell that is very powerful. It is zsh-shell. The bash-shell configuration can usually be set in the .bash_profile file in the user directory, and the zsh-shell can also be set in the .zshrc file in the user directory.
Since zsh-shell is fully customizable, an open source tool, oh my zsh, is an open source, community-driven framework for managing ZSH configurations.

project address

https://github.com/robbyrussell/oh-my-zsh
http://ohmyz.sh

Installation

1
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

or:

1
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

Configuration

Switch to zsh-shell, you can enter zsh through the command line to view.

Or set the shell to start zsh instead of bash:

Oh-my-zsh has a lot of plugins and themes that go to the ~/.zshrc configuration.

Driving

Autojump is a shell plugin that can quickly switch to a specified directory, supporting fuzzy matching, tab completion and other functions.

project address

https://github.com/wting/autojump

Installation

1
brew install autojump

Configuration

After the installation, the terminal directly inputs autojump. If no error is reported, the installation is successful.
If you encounter:

1
please source the correct autojump file in your shell\'s startup file.

Add the following to the end of the ~/.zshrc file: (A .zshrc file will appear in the user directory after installing oh my zsh)

1
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh

Then set the plugins=(git autojump) in the .zshrc file.
After configuration, input in the terminal:

1
source .zshrc

Used to enable the .zshrc configuration, or log off the user to restart the shell to take effect.

Use

1
j keyword


Note: Only directories that have been visited can be quickly accessed using autojump.

zsh-autosuggestions

This is a shell plugin that prompts for history commands.

project address

https://github.com/zsh-users/zsh-autosuggestions

Installation

1
git clone git://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions

Configuration

Vim .zshrc writes the following:

1
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh

After configuration, input in the terminal:

1
source .zshrc

Enable the .zshrc configuration, or log out of the user to restart the shell to take effect.

Use

icdiff

Diff landscaping enhanced version, file difference comparison tool.

project address

https://github.com/jeffkaufman/icdiff

Installation

1
pip install git+https://github.com/jeffkaufman/icdiff.git

Use

httpie

Curl beautification version, format the output.

project address

https://github.com/jakubroztocil/httpie/

Installation

1
brew install httpie

Use

本文标题:Customized MacShell

文章作者:nmask

发布时间:2017年06月27日 - 10:06

最后更新:2019年07月11日 - 18:07

原始链接:https://thief.one/2017/06/27/1/en/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。

nmask wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!
坚持原创技术分享,您的支持将鼓励我继续创作!

热门文章推荐: