forked from clvv/fasd
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs, document about caching init code.
- Loading branch information
Wei Dai
committed
Jul 2, 2012
1 parent
f19cdbc
commit 1abfbad
Showing
4 changed files
with
64 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
% FASD(1) fasd user manual | ||
% Wei Dai <[email protected]> | ||
% Jun 29, 2012 | ||
% Jul 01, 2012 | ||
|
||
# NAME | ||
|
||
|
@@ -85,6 +85,17 @@ Example for a minimal zsh setup (no tab completion): | |
|
||
eval "$(fasd --init posix-alias zsh-hook)" | ||
|
||
Note that this method will slightly increase your shell start-up time, since | ||
calling binaries has overhead. You can cache fasd init code if you want | ||
minimal overhead. Example code for bash (to be put into .bashrc): | ||
|
||
fasd_cache="$HOME/.fasd-init-bash" | ||
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then | ||
fasd --init posix-alias bash-hook bash-ccomp bash-ccomp-install >| "$fasd_cache" | ||
fi | ||
source "$fasd_cache" | ||
unset fasd_cache | ||
|
||
Optionally, if you can also source `fasd` if you want `fasd` to be a shell | ||
function instead of an executable. | ||
|
||
|