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

Commit 611ca7b

Browse files
committed
Cleanup
1 parent 392ed5c commit 611ca7b

File tree

3 files changed

+29
-19
lines changed

3 files changed

+29
-19
lines changed

fasd.plugin.zsh

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
#!/bin/zsh
2-
: ${_FASD_INIT_CACHE:=${ZSH_CACHE_DIR:-${ZDOTDIR:-$HOME}}/.fasd-init}
2+
#
3+
# ZSH-style plugin for `fasd`.
4+
# Allows this repo to be used by any ZSH plugin manager.
5+
#
6+
# You may want to add some of the following to your .zshrc:
7+
#
8+
# alias v="f -e $EDITOR"
9+
# alias v='f -t -e vim -b viminfo'
10+
# alias o='a -e open_command'
11+
#
12+
# bindkey '^X^A' fasd-complete # C-x C-a to do fasd-complete (files and directories)
13+
# bindkey '^X^F' fasd-complete-f # C-x C-f to do fasd-complete-f (only files)
14+
# bindkey '^X^D' fasd-complete-d # C-x C-d to do fasd-complete-d (only directories)
15+
#
16+
: ${_FASD_INIT_CACHE:=${ZSH_CACHE_DIR:-${ZDOTDIR:-$HOME}}/.fasd-init.zsh}
317

4-
path+=($0:h)
5-
manpath+=($0:h)
18+
fpath+=($0:h/fasd.plugin/bin)
19+
manpath+=($0:h/fasd.plugin/man)
620

7-
if [ "${commands[fasd]}" -nt "$_FASD_INIT_CACHE" -o ! -s "$_FASD_INIT_CACHE" ]; then
8-
fasd --init \
9-
posix-alias \
10-
zsh-hook \
11-
zsh-ccomp zsh-ccomp-install \
12-
zsh-wcomp zsh-wcomp-install \
13-
>| "$_FASD_INIT_CACHE"
14-
fi
15-
source "$_FASD_INIT_CACHE"
16-
17-
#alias v="f -e $EDITOR"
18-
#alias v='f -t -e vim -b viminfo'
19-
#alias o='a -e open_command'
21+
emulate sh -c 'autoload -U fasd'
2022

21-
#bindkey '^X^A' fasd-complete # C-x C-a to do fasd-complete (files and directories)
22-
#bindkey '^X^F' fasd-complete-f # C-x C-f to do fasd-complete-f (only files)
23-
#bindkey '^X^D' fasd-complete-d # C-x C-d to do fasd-complete-d (only directories)
23+
if [ $0:h/fasd -nt $_FASD_INIT_CACHE -o ! -s $_FASD_INIT_CACHE ]; then
24+
fasd --init \
25+
posix-alias \
26+
zsh-hook \
27+
zsh-ccomp zsh-ccomp-install \
28+
zsh-wcomp zsh-wcomp-install \
29+
>| "$_FASD_INIT_CACHE"
30+
fi
31+
source $_FASD_INIT_CACHE

fasd.plugin/bin/fasd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../fasd

fasd.plugin/man/man1/fasd.1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../fasd.1

0 commit comments

Comments
 (0)