Skip to content

Commit

Permalink
forcefully load autoloadable functions that are only called from subs…
Browse files Browse the repository at this point in the history
…hells
  • Loading branch information
romkatv committed Jul 5, 2020
1 parent ded1b86 commit 6af0bfc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fn/-z4h-comp-files
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
-z4h-set-list-colors "$_fzf_tab_curcontext" "$list_types"
local -i list_colors=$((!$?))

autoload +X -Uz -- -z4h-present-files -z4h-cursor-show

print >$TTY
{
local choice again
Expand Down
2 changes: 2 additions & 0 deletions fn/z4h-cd-down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
-z4h-set-list-colors complete:cd:: "$list_types"
local -i list_colors=$((!$?))

autoload +X -Uz -- -z4h-present-files -z4h-cursor-show

{
-z4h-show-dots

Expand Down
2 changes: 2 additions & 0 deletions fn/z4h-expand-or-complete
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[[ -w $TTY && -r $TTY ]] || return

autoload +X -Uz -- -z4h-fzf

{
-z4h-cursor-hide

Expand Down
2 changes: 2 additions & 0 deletions fn/z4h-expand-or-complete-recursive
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[[ -w $TTY && -r $TTY ]] || return

autoload +X -Uz -- -z4h-fzf

if (( ! ${+functions[-z4h-orig-path-files]} )); then
autoload +X -Uz _path_files
functions[-z4h-orig-path-files]=${functions[_path_files]}
Expand Down

0 comments on commit 6af0bfc

Please sign in to comment.