mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
add ZSH_MODULE_PATH to customize module path when zmodload
This commit is contained in:
parent
e44aa50301
commit
610146751d
4 changed files with 19 additions and 3 deletions
|
|
@ -8,7 +8,11 @@ setopt always_to_end
|
|||
|
||||
WORDCHARS=''
|
||||
|
||||
zmodload -i zsh/complist
|
||||
if [[ -n $ZSH_MODULE_PATH ]]; then
|
||||
module_path=$ZSH_MODULE_PATH zmodload -i zsh/complist
|
||||
else
|
||||
zmodload -i zsh/complist
|
||||
fi
|
||||
|
||||
## case-insensitive (all),partial-word and then substring completion
|
||||
if [ "x$CASE_SENSITIVE" = "xtrue" ]; then
|
||||
|
|
|
|||
|
|
@ -92,7 +92,12 @@ function env_default() {
|
|||
|
||||
|
||||
# Required for $langinfo
|
||||
zmodload zsh/langinfo
|
||||
if [[ -n $ZSH_MODULE_PATH ]]; then
|
||||
module_path=$ZSH_MODULE_PATH zmodload zsh/langinfo
|
||||
else
|
||||
zmodload zsh/langinfo
|
||||
fi
|
||||
|
||||
|
||||
# URL-encode a string
|
||||
#
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ ZSH_THEME="robbyrussell"
|
|||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# Would you like to use another module_path than zsh compiled with?
|
||||
# export ZSH_MODULE_PATH=/path/to/zsh-module
|
||||
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
zmodload zsh/datetime
|
||||
if [[ -n $ZSH_MODULE_PATH ]]; then
|
||||
module_path=$ZSH_MODULE_PATH zmodload zsh/datetime
|
||||
else
|
||||
zmodload zsh/datetime
|
||||
fi
|
||||
|
||||
function _current_epoch() {
|
||||
echo $(( $EPOCHSECONDS / 60 / 60 / 24 ))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue