Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
550ccca9
Commit
550ccca9
authored
Jan 31, 2015
by
Robby Russell
Browse files
Merge pull request #3478 from stephenrjohnson/custom_cache_dir
Allow custom cache dir
parents
1ac2f864
ceb42ecd
Changes
4
Show whitespace changes
Inline
Side-by-side
lib/completion.zsh
View file @
550ccca9
...
@@ -38,7 +38,7 @@ cdpath=(.)
...
@@ -38,7 +38,7 @@ cdpath=(.)
# Use caching so that commands like apt and dpkg complete are useable
# Use caching so that commands like apt and dpkg complete are useable
zstyle
':completion::complete:*'
use-cache 1
zstyle
':completion::complete:*'
use-cache 1
zstyle
':completion::complete:*'
cache-path
$ZSH
/cache/
zstyle
':completion::complete:*'
cache-path
$ZSH
_CACHE_DIR
# Don't complete uninteresting users
# Don't complete uninteresting users
zstyle
':completion:*:*:*:users'
ignored-patterns
\
zstyle
':completion:*:*:*:users'
ignored-patterns
\
...
...
oh-my-zsh.sh
View file @
550ccca9
...
@@ -14,6 +14,13 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
...
@@ -14,6 +14,13 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
ZSH_CUSTOM
=
"
$ZSH
/custom"
ZSH_CUSTOM
=
"
$ZSH
/custom"
fi
fi
# Set ZSH_CACHE_DIR to the path where cache files sould be created
# or else we will use the default cache/
if
[[
-z
"
$ZSH_CACHE_DIR
"
]]
;
then
ZSH_CACHE_DIR
=
"
$ZSH
/cache/"
fi
# Load all of the config files in ~/oh-my-zsh that end in .zsh
# Load all of the config files in ~/oh-my-zsh that end in .zsh
# TIP: Add files you don't want in git to .gitignore
# TIP: Add files you don't want in git to .gitignore
for
config_file
(
$ZSH
/lib/
*
.zsh
)
;
do
for
config_file
(
$ZSH
/lib/
*
.zsh
)
;
do
...
...
plugins/last-working-dir/last-working-dir.plugin.zsh
View file @
550ccca9
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
# Flag indicating if we've previously jumped to last directory.
# Flag indicating if we've previously jumped to last directory.
typeset
-g
ZSH_LAST_WORKING_DIRECTORY
typeset
-g
ZSH_LAST_WORKING_DIRECTORY
mkdir
-p
"
$ZSH
/cache"
mkdir
-p
$ZSH
_CACHE_DIR
local
cache_file
=
"
$ZSH
/cache
/last-working-dir"
local
cache_file
=
"
$ZSH
_CACHE_DIR
/last-working-dir"
# Updates the last directory once directory is changed.
# Updates the last directory once directory is changed.
function
chpwd
()
{
function
chpwd
()
{
...
...
plugins/zsh_reload/zsh_reload.plugin.zsh
View file @
550ccca9
# reload zshrc
# reload zshrc
function
src
()
function
src
()
{
{
local
cache
=
"
$ZSH
/cache"
local
cache
=
$ZSH
_CACHE_DIR
autoload
-U
compinit zrecompile
autoload
-U
compinit zrecompile
compinit
-d
"
$cache
/zcomp-
$HOST
"
compinit
-d
"
$cache
/zcomp-
$HOST
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment