Cinto de Ferramentas - Como Configurar o terminal no Mac

*Atualizado para o Mac OS Ventura 13.0

  1. Instalar o HomeBrew!
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Não esqueça de colocar o Homebrew no path, no final da instalação já vem os passos, copy-paste e pronto.

Agora vamos ao ITerm2, já usando o Homebrew.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Instalar o Iterm2
brew install iterm2
  1. Instalar o ZSH e o Oh My Zsh

brew install zsh (Atualmente já vem o MacOS já vem com o Z Shell) sh -c “$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)”

  1. Plugins:

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

In ~/.zshrc add the following

plugins=( git bundler kubectl pipenv docker docker-compose virtualenv zsh-autosuggestions z )

  1. Tema e Cores

sudo nano ~/.zshrc

https://iterm2colorschemes.com/

dentro da pasta schemes tem todos os padrões

https://github.com/powerline/fonts

clone

git clone https://github.com/powerline/fonts.git –depth=1

install

cd fonts ./install.sh

clean-up a bit

cd .. rm -rf fonts

outras fontes que podem ser usadas:

Nerd fonts https://github.com/ryanoasis/nerd-fonts#option-4-homebrew-fonts brew tap homebrew/cask-fonts brew install font-hack-nerd-font

https://github.com/tonsky/FiraCode/ brew tap homebrew/cask-fonts brew install font-fira-code

fontes:

https://bartek-blog.github.io/zshell/2020/05/06/zshell-on-mac.html

Tema:

’’’ git clone https://github.com/denysdovhan/spaceship-prompt.git “$ZSH_CUSTOM/themes/spaceship-prompt”

ln -s “$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme” “$ZSH_CUSTOM/themes/spaceship.zsh-theme” ‘’’

no arquivo zshrc pode ser configurado, mas não uso…

SPACESHIP_PROMPT_ORDER=( user # Username section dir # Current directory section host # Hostname section git # Git section (git_branch + git_status) hg # Mercurial section (hg_branch + hg_status) exec_time # Execution time line_sep # Line break vi_mode # Vi-mode indicator jobs # Background jobs indicator exit_code # Exit code section char # Prompt character ) SPACESHIP_USER_SHOW=always SPACESHIP_PROMPT_ADD_NEWLINE=false SPACESHIP_CHAR_SYMBOL=”❯” SPACESHIP_CHAR_SUFFIX=” “

  1. Diretorio com ícones https://github.com/athityakumar/colorls

gem install colorls

no .zshrc file no final colocar: source $(dirname $(gem which colorls))/tab_complete.sh alias lc=’colorls -lA –sd’ alias ls=’colorls -A’

  1. Extras

https://github.com/marlonrichert/zsh-snap

https://github.com/marlonrichert/zsh-autocomplete

Criar um Alias no .zshrc com um alias para habilitar o autocomplete

alias autocomplete=’znap source marlonrichert/zsh-autocomplete’

  1. Ver todos os arquivos no Finder

Unhide files on Mac with Terminal commands Terminal, a Mac command-line interface, is included in macOS by default and allows you to use command prompts to control your Mac instead of following a potentially complex series of instructions to do the same thing in Finder.

If you’re already familiar with using Terminal, then you might prefer to run the following script to reveal your hidden files:

Open Terminal Enter the following: defaults write com.apple.Finder AppleShowAllFiles true [Press Return] killall Finder

git lfs migrate import –include=”.mp4” –include-ref=refs/heads/master git lfs migrate import –include=”.mp3” –include-ref=refs/heads/master git lfs migrate import –include=”.jpeg” –include-ref=refs/heads/master git lfs migrate import –include=”.jpg” –include-ref=refs/heads/master git lfs migrate import –include=”.png” –include-ref=refs/heads/master git lfs migrate import –include=”.pdf” –include-ref=refs/heads/master git lfs migrate import –include=”.JPG” –include-ref=refs/heads/master git lfs migrate import –include=”.PNG” –include-ref=refs/heads/master git lfs migrate import –include=”*.JPG” –include-ref=refs/heads/master

Compartilhe esse Post