mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-23 04:30:24 +02:00
25276: use autoload -z for zsh-autoload functions
This commit is contained in:
parent
1b1712d065
commit
ffabab4e74
27 changed files with 50 additions and 28 deletions
|
@ -4,7 +4,7 @@
|
|||
# $HOME/.zsticky). The number of notes stored is STICKYSIZE (1000).
|
||||
#
|
||||
# Load this file as a function:
|
||||
# autoload -U sticky-note
|
||||
# autoload -Uz sticky-note
|
||||
#
|
||||
# It may then be bound as a widget:
|
||||
# zle -N sticky-note
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Someone once accused zsh of not being as complete as Emacs, because it
|
||||
# lacks Tetris and an adventure game.
|
||||
#
|
||||
# autoload -U tetris
|
||||
# autoload -Uz tetris
|
||||
# zle -N tetris
|
||||
# bindkey '...' tetris
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Put standard xterm/dtterm window control codes in shell parameters for
|
||||
# easy use. Note that some terminals do not support all combinations.
|
||||
|
||||
# autoload -U xtermctl ; xtermctl
|
||||
# autoload -Uz xtermctl ; xtermctl
|
||||
# xtermctl --explain
|
||||
|
||||
# Run once to set up; implements two functions:
|
||||
|
|
|
@ -56,7 +56,7 @@ if (( bind )) || ! bindkey -M zed >&/dev/null; then
|
|||
|
||||
# Make zed-set-file-name available.
|
||||
# Assume it's in fpath; there's no error at this point if it isn't
|
||||
autoload -U zed-set-file-name
|
||||
autoload -Uz zed-set-file-name
|
||||
zle -N zed-set-file-name
|
||||
fi
|
||||
if (( bind )) || ! bindkey -M zed-vicmd >&/dev/null; then
|
||||
|
@ -74,7 +74,7 @@ if ((fun)) then
|
|||
var="$(functions $1)"
|
||||
# If function is undefined but autoloadable, load it
|
||||
if [[ $var = *\#\ undefined* ]] then
|
||||
var="$(autoload +X $1; functions $1)"
|
||||
ar="$(autoload +X $1; functions $1)"
|
||||
elif [[ -z $var ]] then
|
||||
var="$1() {
|
||||
}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue