mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 15:34:50 +08:00
Compare commits
3 Commits
0d7f0356c2
...
8016e26386
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8016e26386 | ||
|
|
92aed2e936 | ||
|
|
1c14f34b43 |
38
oh-my-zsh.sh
38
oh-my-zsh.sh
@ -192,25 +192,6 @@ _omz_source() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load all of the lib files in ~/.oh-my-zsh/lib that end in .zsh
|
|
||||||
# TIP: Add files you don't want in git to .gitignore
|
|
||||||
for lib_file ("$ZSH"/lib/*.zsh); do
|
|
||||||
_omz_source "lib/${lib_file:t}"
|
|
||||||
done
|
|
||||||
unset lib_file
|
|
||||||
|
|
||||||
# Load all of the plugins that were defined in ~/.zshrc
|
|
||||||
for plugin ($plugins); do
|
|
||||||
_omz_source "plugins/$plugin/$plugin.plugin.zsh"
|
|
||||||
done
|
|
||||||
unset plugin
|
|
||||||
|
|
||||||
# Load all of your custom configurations from custom/
|
|
||||||
for config_file ("$ZSH_CUSTOM"/*.zsh(N)); do
|
|
||||||
source "$config_file"
|
|
||||||
done
|
|
||||||
unset config_file
|
|
||||||
|
|
||||||
# Load the theme
|
# Load the theme
|
||||||
is_theme() {
|
is_theme() {
|
||||||
local base_dir=$1
|
local base_dir=$1
|
||||||
@ -230,5 +211,24 @@ if [[ -n "$ZSH_THEME" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Load all of the lib files in ~/.oh-my-zsh/lib that end in .zsh
|
||||||
|
# TIP: Add files you don't want in git to .gitignore
|
||||||
|
for lib_file ("$ZSH"/lib/*.zsh); do
|
||||||
|
_omz_source "lib/${lib_file:t}"
|
||||||
|
done
|
||||||
|
unset lib_file
|
||||||
|
|
||||||
|
# Load all of the plugins that were defined in ~/.zshrc
|
||||||
|
for plugin ($plugins); do
|
||||||
|
_omz_source "plugins/$plugin/$plugin.plugin.zsh"
|
||||||
|
done
|
||||||
|
unset plugin
|
||||||
|
|
||||||
|
# Load all of your custom configurations from custom/
|
||||||
|
for config_file ("$ZSH_CUSTOM"/*.zsh(N)); do
|
||||||
|
source "$config_file"
|
||||||
|
done
|
||||||
|
unset config_file
|
||||||
|
|
||||||
# set completion colors to be the same as `ls`, after theme has been loaded
|
# set completion colors to be the same as `ls`, after theme has been loaded
|
||||||
[[ -z "$LS_COLORS" ]] || zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
[[ -z "$LS_COLORS" ]] || zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||||
|
|||||||
@ -77,7 +77,15 @@ EOF
|
|||||||
(*.lzma) unlzma "$full_path" ;;
|
(*.lzma) unlzma "$full_path" ;;
|
||||||
(*.z) uncompress "$full_path" ;;
|
(*.z) uncompress "$full_path" ;;
|
||||||
(*.zip|*.war|*.jar|*.ear|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl|*.vsix|*.crx|*.pk3|*.pk4) unzip "$full_path" ;;
|
(*.zip|*.war|*.jar|*.ear|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl|*.vsix|*.crx|*.pk3|*.pk4) unzip "$full_path" ;;
|
||||||
(*.rar) unrar x -ad "$full_path" ;;
|
(*.rar)
|
||||||
|
if (( $+commands[unrar] )); then
|
||||||
|
unrar x -ad "$full_path"
|
||||||
|
elif (( $+commands[unar] )); then
|
||||||
|
unar -o . "$full_path"
|
||||||
|
else
|
||||||
|
echo "extract: cannot extract RAR files: install unrar or unar" >&2
|
||||||
|
success=1
|
||||||
|
fi ;;
|
||||||
(*.rpm)
|
(*.rpm)
|
||||||
rpm2cpio "$full_path" | cpio --quiet -id ;;
|
rpm2cpio "$full_path" | cpio --quiet -id ;;
|
||||||
(*.7z | *.7z.[0-9]* | *.pk7) 7za x "$full_path" ;;
|
(*.7z | *.7z.[0-9]* | *.pk7) 7za x "$full_path" ;;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user