在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:ghaiklor/iterm-fish-fisher-osx开源软件地址:https://github.com/ghaiklor/iterm-fish-fisher-osx开源编程语言:Shell 100.0%开源软件介绍:Command Line Tools + Homebrew + iTerm2 + Fish Shell + Fisher + PluginsTired of using the built-in shell that has a bad developer experience? Do you want to have the awesomeness in your terminal with a cool autocomplete, 24-bit colors, customized prompt to display the info you need most? In such case, this guide is for you! The ProblemI use my terminal environment a lot for different tasks. When you work with your terminal a lot, eventually, you end up with plugins you use, themes you installed, external dependencies you need and stuff like that. Once you re-install the operating system, you need to go through configuration again - pain! The same happened to me, so I’ve decided that I can automate installation for my terminal environment. Moreover, I shared it with you all in a handy Bash script that is easy to use. Demo
Features
Automatic InstallationJust copy and paste the command into your terminal - simple. The installer detects what is absent from your machine and will install it. In case your machine already has a dependency, it will skip the installation for it. bash <(curl --silent --location "https://github.com/ghaiklor/iterm-fish-fisher-osx/blob/master/install.sh?raw=true") Manual InstallationIn case you want to set up everything manually, this section is for you. Command Line ToolsCommand Line Tools are the tools that are required to use your Mac as a developer machine. This package contains tools like git, header files, etc... Although, you don’t need to install the whole XCode app for that. You can install only the required part by executing: xcode-select --install HomebrewHomebrew is “The Missing Package Manager for macOS”. It provides the way to install the packages to your machine as with usual package managers on Linux, like yum or apt-get. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" NOTE: Depending on the MacBook you have, the path where Homebrew will be installed differs. For Intel based Mac it's /usr/local/bin/brew, while for ARM based Mac it's /opt/homebrew/bin/brew. iTerm2iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.14 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted. This is one of the terminal emulators, that works great with color fidelity and patched fonts with ligatures. Also, it has a tmux support and a lot of other stuff. Check out their website for more details. brew install --cask iterm2 iTerm 2 Color SchemeInstall the color scheme for iTerm2 that uses Material Design Color Palette. Download the file material-design-colors.itermcolors and open it to import into iTerm2. Afterwards, apply the color palette in Preferences -> Profiles -> Default -> Colors. iTerm 2 Nerd FontsThere is a project called Nerd Fonts. Nerd Fonts is a project that patches developer targeted fonts with a high number of glyphs (icons). Specifically, to add a high number of extra glyphs from popular ‘iconic fonts’ such as Font Awesome, Devicons, Octicons, and others. We use one of their fonts to render the theme that uses ligatures from there. So you need to download the font, install it in the Font Book and apply in your terminal emulator [iTerm2]. When you download the font, you can open it by double clicking.
It will open the Font Book and install the font.
Afterwards, go to iTerm2 -> Preferences -> Profiles -> Default -> Text and set the font Set the same font for "Non-ASCII text" and do not forget to check the “Use ligatures“ checkbox. Fish ShellFish Shell is a smart and user-friendly command line shell for Linux, macOS, and the rest of the family. First, install the shell using homebrew: brew install fish Now, we can’t change the default shell without adding it to the list of known shells: command -v fish | sudo tee -a /etc/shells Change the default shell to Fish Shell: chsh -s "$(command -v fish)" FisherRestart your terminal emulator and make sure that you are under Fish Shell now. In case you own an ARM based Mac, you will have a Homebrew installed in fish_add_path /opt/homebrew/bin/ Afterwards, you can install Fisher. Fisher is a plugin manager for Fish. It helps manage functions, completions, bindings, and snippets from the command line. curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher PluginsSmall things left. Just install the plugins using Fisher. Here is the list of plugins: When you finished installing the plugins, you need to configure some of them. You need to enable the Nerd Fonts support for the theme, change the color palette and set the path where your projects located. set --universal --export theme_nerd_fonts yes
set --universal --export theme_color_scheme zenburn
set --universal --export PROJECT_PATHS ~/Library/Projects Afterwards, update the completions for Fish Shell to get an amazing auto-complete in your shell: fish_update_completions License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论