mirror of
https://github.com/kremalicious/dotfiles.git
synced 2024-12-22 01:03:24 +01:00
zsh tweaks
This commit is contained in:
parent
e1631e82d8
commit
662c3e7d29
@ -15,7 +15,9 @@ brew upgrade --all
|
||||
# Install what we need
|
||||
brew install \
|
||||
coreutils \
|
||||
zsh
|
||||
zsh \
|
||||
zsh-syntax-highlighting \
|
||||
zsh-autosuggestions \
|
||||
git \
|
||||
node \
|
||||
wget \
|
||||
|
@ -50,20 +50,18 @@ echo "=============================================$(tput sgr0)"
|
||||
echo "$(tput setaf 64)---------------------------------------------"
|
||||
echo " ✓ done$(tput sgr0)"
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# source what we just created
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Switch to using brew-installed zsh as default shell
|
||||
if ! grep -F -q '/usr/local/bin/zsh' /etc/shells; then
|
||||
echo '/usr/local/bin/zsh' | sudo tee -a /etc/shells;
|
||||
chsh -s /usr/local/bin/zsh;
|
||||
fi;
|
||||
|
||||
# install https://github.com/robbyrussell/oh-my-zsh
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||
npm i -g pure-prompt
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# source what we just created
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
source "$HOME/.zshrc"
|
||||
|
||||
|
12
exports
12
exports
@ -1,15 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Set architecture flags
|
||||
export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# Prefer US English and use UTF-8
|
||||
export LC_ALL="en_US.UTF-8"
|
||||
export LANG="en_US"
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# ---------------------------------------------------
|
||||
# PATH
|
||||
# ---------------------------------------------------
|
||||
|
||||
export PATH=$HOME/.bin:/usr/local/bin:"$(brew --prefix openssl)/bin":"$(brew --prefix ruby)/bin":"/usr/local/lib/ruby/gems/2.6.0/bin":"$(brew --prefix python)/libexec/bin":"$HOME/.go/bin":"$(brew --prefix go)/libexec/bin":$PATH
|
||||
PATH_OPENSSL=$(brew --prefix openssl)/bin
|
||||
PATH_RUBY=$(brew --prefix ruby)/bin
|
||||
PATH_GEMS=/usr/local/lib/ruby/gems/2.6.0/bin
|
||||
PATH_PYTHON=$(brew --prefix python)/libexec/bin
|
||||
PATH_GO=$(brew --prefix go)/libexec/bin
|
||||
|
||||
export GOPATH=$HOME/.go/
|
||||
export PATH=$HOME/.bin:/usr/local/bin:$PATH_OPENSSL:$PATH_RUBY:$PATH_GEMS:$PATH_PYTHON:$GOPATH/bin:$PATH_GO:$PATH
|
||||
# define CDPATHs which are autocompleted from when doing cd
|
||||
export CDPATH=$CDPATH:~/Code
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# dotfiles
|
||||
|
||||
> 👩🎤 personal dotfiles, scrambled together from the interwebz. Highly macOS oriented, with zsh, oh-my-zsh, Homebrew.
|
||||
> 👩🎤 personal dotfiles, scrambled together from the interwebz. Highly macOS oriented, with zsh, Homebrew.
|
||||
|
||||
[![Build Status](https://travis-ci.com/kremalicious/dotfiles.svg?branch=master)](https://travis-ci.com/kremalicious/dotfiles)
|
||||
|
||||
|
62
zshrc
62
zshrc
@ -2,30 +2,68 @@
|
||||
|
||||
# https://github.com/sindresorhus/pure
|
||||
autoload -U promptinit; promptinit
|
||||
PURE_GIT_DOWN_ARROW=↓
|
||||
PURE_GIT_UP_ARROW=↑
|
||||
prompt pure
|
||||
|
||||
# CASE_SENSITIVE="true"
|
||||
# https://gist.github.com/ctechols/ca1035271ad134841284#gistcomment-2767420
|
||||
autoload -Uz compinit
|
||||
|
||||
setopt EXTENDEDGLOB
|
||||
for dump in $ZSH_COMPDUMP(#qN.m1); do
|
||||
compinit
|
||||
if [[ -s "$dump" && (! -s "$dump.zwc" || "$dump" -nt "$dump.zwc") ]]; then
|
||||
zcompile "$dump"
|
||||
fi
|
||||
echo "Initializing Completions..."
|
||||
done
|
||||
unsetopt EXTENDEDGLOB
|
||||
compinit -C
|
||||
|
||||
CASE_SENSITIVE="true"
|
||||
DISABLE_UPDATE_PROMPT="true"
|
||||
DISABLE_AUTO_TITLE="true"
|
||||
ENABLE_CORRECTION="true"
|
||||
|
||||
# History
|
||||
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
|
||||
HIST_STAMPS="yyyy-mm-dd"
|
||||
HISTSIZE=50000
|
||||
SAVEHIST=10000
|
||||
setopt extended_history
|
||||
setopt hist_expire_dups_first
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_ignore_space
|
||||
setopt inc_append_history
|
||||
setopt share_history
|
||||
|
||||
# https://carlosbecker.com/posts/speeding-up-zsh/
|
||||
autoload -Uz compinit
|
||||
for dump in ~/.zcompdump(N.mh+24); do
|
||||
compinit
|
||||
done
|
||||
compinit -C
|
||||
# Changing directories
|
||||
setopt auto_cd
|
||||
setopt auto_pushd
|
||||
unsetopt pushd_ignore_dups
|
||||
setopt pushdminus
|
||||
|
||||
# Oh My Zsh
|
||||
export ZSH="/Users/m/.oh-my-zsh"
|
||||
ZSH_THEME=""
|
||||
plugins=(git)
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
# Completion
|
||||
setopt auto_menu
|
||||
setopt always_to_end
|
||||
setopt complete_in_word
|
||||
unsetopt flow_control
|
||||
unsetopt menu_complete
|
||||
zstyle ':completion:*:*:*:*:*' menu select
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion::complete:*' use-cache 1
|
||||
zstyle ':completion::complete:*' cache-path $ZSH_CACHE_DIR
|
||||
zstyle ':completion:*' list-colors ''
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
|
||||
# Other
|
||||
setopt prompt_subst
|
||||
|
||||
# User configuration
|
||||
source ~/.exports
|
||||
source ~/.aliases
|
||||
source ~/.private
|
||||
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
|
||||
# zprof
|
Loading…
Reference in New Issue
Block a user