Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
akatrevorjay committed Jul 10, 2016
1 parent 392ed5c commit 611ca7b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
46 changes: 27 additions & 19 deletions fasd.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
#!/bin/zsh
: ${_FASD_INIT_CACHE:=${ZSH_CACHE_DIR:-${ZDOTDIR:-$HOME}}/.fasd-init}
#
# ZSH-style plugin for `fasd`.
# Allows this repo to be used by any ZSH plugin manager.
#
# You may want to add some of the following to your .zshrc:
#
# alias v="f -e $EDITOR"
# alias v='f -t -e vim -b viminfo'
# alias o='a -e open_command'
#
# bindkey '^X^A' fasd-complete # C-x C-a to do fasd-complete (files and directories)
# bindkey '^X^F' fasd-complete-f # C-x C-f to do fasd-complete-f (only files)
# bindkey '^X^D' fasd-complete-d # C-x C-d to do fasd-complete-d (only directories)
#
: ${_FASD_INIT_CACHE:=${ZSH_CACHE_DIR:-${ZDOTDIR:-$HOME}}/.fasd-init.zsh}

path+=($0:h)
manpath+=($0:h)
fpath+=($0:h/fasd.plugin/bin)
manpath+=($0:h/fasd.plugin/man)

if [ "${commands[fasd]}" -nt "$_FASD_INIT_CACHE" -o ! -s "$_FASD_INIT_CACHE" ]; then
fasd --init \
posix-alias \
zsh-hook \
zsh-ccomp zsh-ccomp-install \
zsh-wcomp zsh-wcomp-install \
>| "$_FASD_INIT_CACHE"
fi
source "$_FASD_INIT_CACHE"

#alias v="f -e $EDITOR"
#alias v='f -t -e vim -b viminfo'
#alias o='a -e open_command'
emulate sh -c 'autoload -U fasd'

#bindkey '^X^A' fasd-complete # C-x C-a to do fasd-complete (files and directories)
#bindkey '^X^F' fasd-complete-f # C-x C-f to do fasd-complete-f (only files)
#bindkey '^X^D' fasd-complete-d # C-x C-d to do fasd-complete-d (only directories)
if [ $0:h/fasd -nt $_FASD_INIT_CACHE -o ! -s $_FASD_INIT_CACHE ]; then
fasd --init \
posix-alias \
zsh-hook \
zsh-ccomp zsh-ccomp-install \
zsh-wcomp zsh-wcomp-install \
>| "$_FASD_INIT_CACHE"
fi
source $_FASD_INIT_CACHE
1 change: 1 addition & 0 deletions fasd.plugin/bin/fasd
1 change: 1 addition & 0 deletions fasd.plugin/man/man1/fasd.1

0 comments on commit 611ca7b

Please sign in to comment.