start out with thoughtbots version

This commit is contained in:
Thomas Ruoff
2017-08-13 23:14:19 +02:00
parent e2663a5f4b
commit a638143b7f
24 changed files with 279 additions and 123 deletions

6
zsh/configs/color.zsh Normal file
View File

@@ -0,0 +1,6 @@
# makes color constants available
autoload -U colors
colors
# enable colored output from ls, etc. on FreeBSD-based systems
export CLICOLOR=1

2
zsh/configs/editor.zsh Normal file
View File

@@ -0,0 +1,2 @@
export VISUAL=vim
export EDITOR=$VISUAL

4
zsh/configs/history.zsh Normal file
View File

@@ -0,0 +1,4 @@
setopt hist_ignore_all_dups inc_append_history
HISTFILE=~/.zhistory
HISTSIZE=4096
SAVEHIST=4096

View File

@@ -0,0 +1,17 @@
# give us access to ^Q
stty -ixon
# vi mode
bindkey -v
bindkey "^F" vi-cmd-mode
# handy keybindings
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
bindkey "^K" kill-line
bindkey "^R" history-incremental-search-backward
bindkey "^P" history-search-backward
bindkey "^Y" accept-and-hold
bindkey "^N" insert-last-word
bindkey "^Q" push-line-or-edit
bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy"

9
zsh/configs/options.zsh Normal file
View File

@@ -0,0 +1,9 @@
# awesome cd movements from zshkit
setopt autocd autopushd pushdminus pushdsilent pushdtohome cdablevars
DIRSTACKSIZE=5
# Enable extended globbing
setopt extendedglob
# Allow [ or ] whereever you want
unsetopt nomatch

View File

@@ -0,0 +1,6 @@
# load our own completion functions
fpath=(~/.zsh/completion /usr/local/share/zsh/site-functions $fpath)
# completion
autoload -U compinit
compinit

12
zsh/configs/post/path.zsh Normal file
View File

@@ -0,0 +1,12 @@
# ensure dotfiles bin directory is loaded first
PATH="$HOME/.bin:/usr/local/sbin:$PATH"
# load rbenv if available
if command -v rbenv >/dev/null; then
eval "$(rbenv init - --no-rehash)"
fi
# mkdir .git/safe in the root of repositories you trust
PATH=".git/safe/../../bin:$PATH"
export -U PATH

9
zsh/configs/prompt.zsh Normal file
View File

@@ -0,0 +1,9 @@
# modify the prompt to contain git branch name if applicable
git_prompt_info() {
current_branch=$(git current-branch 2> /dev/null)
if [[ -n $current_branch ]]; then
echo " %{$fg_bold[green]%}$current_branch%{$reset_color%}"
fi
}
setopt promptsubst
PS1='${SSH_CONNECTION+"%{$fg_bold[green]%}%n@%m:"}%{$fg_bold[blue]%}%c%{$reset_color%}$(git_prompt_info) %# '