Skip to content

Commit

Permalink
fix: fix two lines
Browse files Browse the repository at this point in the history
- put back in place the `fpath` line
- fixed original functionality allowing the plugin `initfile` to have a different name from the plugin repository
  • Loading branch information
mamaraddio authored Apr 9, 2024
1 parent c7f45f4 commit 048a43e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zap.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export ZSHRC="${ZDOTDIR:-$HOME}/.zshrc"
export ZAP_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/zap"
export ZAP_PLUGIN_DIR="$ZAP_DIR/plugins"
export -a ZAP_INSTALLED_PLUGINS=()
fpath+="$ZAP_DIR/completion"

function plug() {

Expand All @@ -20,6 +21,7 @@ function plug() {
# Use the specified plugin_name
local -a initfiles=(
$plugin_dir/${plugin_name}.{plugin.,}{z,}sh{-theme,}(N)
$plugin_dir/*.{plugin.,}{z,}sh{-theme,}(N)
)
(( $#initfiles )) && source $initfiles[1]
fi
Expand Down

0 comments on commit 048a43e

Please sign in to comment.