Using stow-rename, unhide all the files :3

This commit is contained in:
Danielle McLean 2016-10-07 23:13:58 +11:00
parent 5c13c69a84
commit 68d5f293cf
No known key found for this signature in database
GPG key ID: CC91589719027E94
26 changed files with 2 additions and 0 deletions

1
config/zsh/.zprofile Symbolic link
View file

@ -0,0 +1 @@
zprofile

1
config/zsh/.zshrc Symbolic link
View file

@ -0,0 +1 @@
zshrc

6
config/zsh/all/functions Normal file
View file

@ -0,0 +1,6 @@
#! zsh
# autoloaded functions must be declared in every kind of zsh: they aren't
# inherited in the environment so non-login shells need them, and you'll want
# to call one in a script so non-interactive shells need them.
autoload composer enphp unphp
autoload -Uz zargs zmv

View file

@ -0,0 +1,5 @@
#! zsh
# Composer runs significantly faster if xdebug is unloaded.
local conf="$(php -r 'echo dirname(php_ini_loaded_file());')"
(cd $conf; rsync -ar --delete-after --exclude ext-xdebug.ini conf.d/ conf-without-xdebug.d/)
PHP_INI_SCAN_DIR=$conf/conf-without-xdebug.d php =composer "$@"

View file

@ -0,0 +1,2 @@
#! zsh
cat $argv | php -r 'echo serialize( json_decode( file_get_contents( "php://stdin" ) ) );'

View file

@ -0,0 +1,7 @@
#! zsh
if [[ -z $BUFFER && -n $jobstates ]]; then
BUFFER=" fg"
zle accept-line
else
zle self-insert '^Z'
fi

View file

@ -0,0 +1,2 @@
#! zsh
cat $argv | php -r 'echo json_encode( unserialize( file_get_contents( "php://stdin" ) ) );'

View file

@ -0,0 +1,2 @@
#! zsh
fortune $XDG_CACHE_HOME/sav-quotes/quotes | ponysay

View file

@ -0,0 +1,17 @@
#! zsh
alias has_command='whence >/dev/null'
alias ls="ls -F --color=auto"
alias lsl="ls -lh"
alias grep="grep --color=auto"
alias egrep="egrep --color=auto"
alias pseudo="sudo"
if has_command xdg-open; then
alias ]='xdg-open'
else
alias ]='open'
fi
# make sure ELinks can detect when it's in tmux
alias elinks="STY= elinks"
has_command hub && alias git=hub

View file

@ -0,0 +1,34 @@
#! zsh
zle-line-init() {}
zle -N zle-line-init
autoload -Uz select-word-style
select-word-style shell
# Allow S-Tab to backtrack through the completion menu.
bindkey $terminfo[kcbt] reverse-menu-complete
# Tweaks to vi mode:
bindkey '^?' backward-delete-char # backspace over the start of Insert mode
bindkey 'jj' vi-cmd-mode # inoremap jj <Esc>
# Backward-kill long paths one directory at a time.
bindkey '^W' backward-kill-word
zstyle ':zle:backward-kill-word' word-style unspecified
zstyle ':zle:backward-kill-word' word-chars ' /'
# Make ^Z resume your suspended job if there is one.
autoload fancy-ctrl-z
zle -N fancy-ctrl-z
bindkey '^Z' fancy-ctrl-z
# Allow for magic such as url-quote-magic to apply when your terminal supports
# bracketed paste.
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
# url-quote-magic will automatically quote special chars in URLs pasted into
# the terminal.
autoload -Uz url-quote-magic
url-quote-magic-with-highlight() { url-quote-magic; _zsh_highlight }
zle -N self-insert url-quote-magic-with-highlight

View file

@ -0,0 +1,3 @@
#! zsh
export FZF_CTRL_R_OPTS="--sort"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

View file

@ -0,0 +1,10 @@
#! zsh
HISTFILE=$XDG_DATA_HOME/zsh/history
mkdir -p ${HISTFILE:h}
HISTSIZE=50000
SAVEHIST=$HISTSIZE
setopt extended_history
setopt hist_ignore_all_dups hist_ignore_space
setopt hist_verify
setopt share_history

View file

@ -0,0 +1 @@
../../../../../.iterm2_shell_integration.zsh

View file

@ -0,0 +1,5 @@
#! zsh
setopt correct
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' menu select=2

3
config/zsh/interactive/z Normal file
View file

@ -0,0 +1,3 @@
#! zsh
_Z_DATA=$XDG_DATA_HOME/z/z
mkdir -p ${_Z_DATA:h}

2
config/zsh/login/editor Normal file
View file

@ -0,0 +1,2 @@
#! zsh
export EDITOR==vim

5
config/zsh/login/fpath Normal file
View file

@ -0,0 +1,5 @@
#! zsh
fpath=($ZDOTDIR/functions $fpath)
# filter out duplicates, nonexistent directories, and . (the current directory)
fpath=(${(u)^fpath:#.}(N))

34
config/zsh/login/langs Normal file
View file

@ -0,0 +1,34 @@
#! zsh
local newbins=()
# go
[[ -z $GOPATH ]] && export GOPATH=~/.go
newbins+=(~/.go/bin)
# haskell
newbins+=(~/.cabal/bin ~/Library/Haskell/bin)
# ooc
if whence rock >/dev/null; then
export OOC_LIBS=/usr/local/Cellar/rock/0.9.10:~/.ooc
newbins+=(~/.ooc/sam)
fi
# ruby
newbins+=(~/.gem/ruby/*/bin)
# perl
export PERL_LOCAL_LIB_ROOT="$HOME/perl5:$PERL_LOCAL_LIB_ROOT"
export PERL_MB_OPT="--install_base '$HOME/perl5'";
export PERL_MM_OPT="INSTALL_BASE=$HOME/perl5";
export PERL5LIB="$HOME/perl5/lib/perl5:$HOME/.perllibs:$PERL5LIB";
newbins+=(~/perl5/bin)
# php
newbins+=(~/.composer/vendor/bin)
# python
export -UT PYTHONPATH pythonpath
path=($newbins $path)

17
config/zsh/login/path Normal file
View file

@ -0,0 +1,17 @@
#! zsh
path=(/usr/local/bin $path)
if whence brew >/dev/null; then
path=(
/usr/local/opt/coreutils/libexec/gnubin
/usr/local/sbin
~/Library/Python/*/bin
$path
)
fi
path=(/usr/local/texlive/20*/bin/universal-* $path)
path=(~/bin ~/.bin ~/.local/bin $path)
# filter out duplicates, nonexistent directories, and . (the current directory)
path=(${(u)^path:#.}(N))

3
config/zsh/login/skip Normal file
View file

@ -0,0 +1,3 @@
#! zsh
skip_global_compinit=1
skip_path_helper=1

28
config/zsh/zplug Normal file
View file

@ -0,0 +1,28 @@
#! zsh
export ZPLUG_HOME=$XDG_CACHE_HOME/zplug
if [[ ! -f $ZPLUG_HOME/repos/zplug/zplug/init.zsh ]]; then
git clone https://github.com/zplug/zplug $ZPLUG_HOME/repos/zplug/zplug
fi
source $ZPLUG_HOME/repos/zplug/zplug/init.zsh
zplug zplug/zplug
zplug willghatch/zsh-saneopt
zplug bobthecow/git-flow-completion
zplug mafredri/zsh-async
zplug micha/resty
zplug rupa/z, use:z.sh
zplug sharat87/zsh-vim-mode
zplug sindresorhus/pure
zplug supercrabtree/k
zplug zsh-users/zsh-syntax-highlighting, nice:10
zplug zsh-users/zsh-completions, nice:11
zplug zsh-users/zsh-history-substring-search, nice:9
zplug trapd00r/LS_COLORS, hook-load:apply-trapd00r-colors
apply-trapd00r-colors() {
eval $(dircolors -b $ZPLUG_REPOS/trapd00r/LS_COLORS/LS_COLORS)
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
}
zplug $ZDOTDIR/interactive/\*, from:local
zplug check || zplug install
zplug load

1
config/zsh/zprofile Normal file
View file

@ -0,0 +1 @@
for f in $ZDOTDIR/login/*(-.N); source $f

1
config/zsh/zshenv Normal file
View file

@ -0,0 +1 @@
for f in $ZDOTDIR/all/*(-.N); source $f

2
config/zsh/zshrc Normal file
View file

@ -0,0 +1,2 @@
source $ZDOTDIR/zplug
[[ -o login ]] && for f in $ZDOTDIR/interactive+login/*(-.N); source $f