Skip to content

Commit

Permalink
Allow functions in a module to be symlinks
Browse files Browse the repository at this point in the history
Add the '-' flag to the function glob which makes the other flag test
against the target of the symlink, and not the symlink itself.

When using rcm (https://github.com/thoughtbot/rcm), the function files
are symlinked by default, but the current glob excludes them by
targeting normal files (with the '.' flag).

Signed-off-by: Sorin Ionescu <[email protected]>
  • Loading branch information
caleb authored and eprst committed Jan 23, 2015
1 parent b2511ce commit 9ae3343
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ unset min_zsh_version
function pmodload {
local -a pmodules
local pmodule
local pfunction_glob='^([_.]*|prompt_*_setup|README*)(.N:t)'
local pfunction_glob='^([_.]*|prompt_*_setup|README*)(-.N:t)'

# $argv is overridden in the anonymous function.
pmodules=("$argv[@]")
Expand Down

0 comments on commit 9ae3343

Please sign in to comment.