项目作者: lanespade

项目描述 :
Automated setup of my shell
高级语言: Shell
项目地址: git://github.com/lanespade/lsh.git
创建时间: 2020-07-14T08:04:29Z
项目社区:https://github.com/lanespade/lsh

开源协议:MIT License

下载


Installation

Disclaimer

This is only tested on the latest M1 macOS

install.zsh

brew.zsh

ignore.zsh

  • Creates / replaces ~/.ignore

npm.zsh

  • Reinstalls nvm (via zsh-nvm)
  • Creates / replaces ~/.nvmrc with ‘stable’
  • Installs npm

zshrc.zsh

terminal.zsh

  • Replace ~/Library/Preferences/com.apple.Terminal.plist in order to…
    • Default to Homebrew
    • Switch to Fira Code Light font
    • Enable “Use option as Meta Key”

tl;dr

  1. git clone https://github.com/lanespade/lsh.git
  2. cd lsh
  3. ./install.zsh
  4. Logout and log back in

Shell Breakdown (.zshrc)

NVM

Loads zsh-nvm plugin to enable nvm with completion

Custom Prompt

Loads spaceship

Completion

Enables zsh and bash built-in completions

FZF Completion

Loads fzf-tab plugin to enable fuzzy completion

FZF

Opinionated, minimal configuration of the fzf keybindings, Alt-C, Ctrl-R, and Ctrl-T

Alt-C

Finds directory to change to by name, starting at the home directory using fd while previewing contents using tree

Ctrl-T

Finds file by name, starting in the current directory using fd in fullscreen mode while previewing contents using bat

Interactive Git

Enables forgit for interactive git commands

Aliases

Primarily around git and the extremely valuable l alias (inspired by oh-my-zsh)

Custom Key Bindings

Ctrl-f (Find in Files)

A key binding connected to a function that combines fzf and rg to search file contents and selected files back to the prompt to be used however (i.e. opened with an editor, removed, moved, chmod, etc.)

Ctrl-x (Kill Process)

A key binding connected to a function that combines fzf and ps to filter, select (multi), and terminate kill-able processes

Auto Suggestions

Loads zsh-autosuggestions plugin to enable suggestions as you type

Syntax Highlighting

Loads zsh-syntax-highlighting plugin to enable syntax highlighting as you type