Software Crafting
  • Introduction
  • Tools
    • *nix\/Shell Setup
      • zsh
        • Switching to zsh
        • zsh Themes
        • zsh Prompt Escape Sequences
        • Troubleshooting
    • git
      • Addressing common errors
    • GitHub
      • GitHub Markdown Cheetsheet
      • Configure \/ Make \/ Make Install
    • tmux
      • Useful tmux Links
    • vim
      • Build from Repository Tips
    • Ubuntu
    • Misc
  • Seminars
    • 2018 SCaLE 16x Container Days
    • 2017 MATLAB Expo
    • 2017 SoCal Code Camp
    • 2017 SCNA
    • 2017 MathWorks Advisory Board
      • Day 1: MATLAB Platform and Data Analytics
      • Day 2: Model-Based Design with Simulink: Modeling and Simulation
      • Day 3: Model-Based Design with Simulink: Code Gen and V&V
    • Agile Systems Engineering Planning Using Six Thinking Hats
    • 2016 SoCal Code Camp
    • 2016 SCNA
    • 2016 Pre-SCNA Workshop
  • Programming
    • Javascript
      • Node.js
        • Frameworks
    • Python 2
    • Rust
    • Makefiles
    • GNU General Public License (GPL)
  • Crafting
  • Algorithms
  • Amazon Web Services
    • Administrating
Powered by GitBook
On this page
  • Helpful Commands
  • My settings
  • Kill the lag
  • Theme
  • Plugins

Was this helpful?

  1. Tools
  2. *nix\/Shell Setup

zsh

Previous*nix\/Shell SetupNextSwitching to zsh

Last updated 6 years ago

Was this helpful?

Helpful Commands

  • cd - Back to the previous folder

  • CTRL+R History search

  • hash -r Force path hash update

My settings

Kill the lag

By default, there is a 0.4 second delay after you hit the key and when the mode change is registered. This results in a very jarring and frustrating transition between modes. Let's reduce this delay to 0.1 seconds.

export KEYTIMEOUT=1

Theme

I use to handle themes, and use the theme. I customize the theme's prompt to only display the current directory (instead of the pull path) as follows:

# primary prompt 
PROMPT='$FG[237]----------------------------------------------------------->
$FG[032]%c\ 
$(git_prompt_info) \ 
$FG[105]%(!.#.»)%{$reset_color%} ' 
PROMPT2='%{$fg[red]%}\ %{$reset_color%}' 
RPS1='${return_code}'

The key change is using $FG[032]%c\ instead of $FG[032]%~\.

Plugins

Plugins can add very useful functionality, but the number of plugins used impacts start-up performance. That being said, I use the following plugins:

  • git

  • vi-mode

  • history-substring-search

Five ZSH tricks to optimize your shell workflow
Five ZSH tricks to optimize your shell workflow
why is bash looking for vim in /usr/bin
Reference
oh-my-zsh
af-magic