diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/asdf/asdf.plugin.zsh | 8 | ||||
-rw-r--r-- | plugins/brew/README.md | 2 | ||||
-rw-r--r-- | plugins/brew/brew.plugin.zsh | 2 | ||||
-rw-r--r-- | plugins/cake/README.md | 15 | ||||
-rw-r--r-- | plugins/emacs/emacs.plugin.zsh | 2 | ||||
-rw-r--r-- | plugins/extract/README.md | 1 | ||||
-rw-r--r-- | plugins/extract/_extract | 2 | ||||
-rw-r--r-- | plugins/extract/extract.plugin.zsh | 2 | ||||
-rw-r--r-- | plugins/git/git.plugin.zsh | 8 | ||||
-rw-r--r-- | plugins/jenv/jenv.plugin.zsh | 2 | ||||
-rw-r--r-- | plugins/laravel/README.md | 45 | ||||
-rw-r--r-- | plugins/laravel/laravel.plugin.zsh | 23 | ||||
-rw-r--r-- | plugins/osx/spotify | 11 | ||||
-rw-r--r-- | plugins/ros/README.mkd | 10 | ||||
-rw-r--r-- | plugins/ros/_ros | 64 | ||||
-rw-r--r-- | plugins/ssh-agent/ssh-agent.plugin.zsh | 47 | ||||
-rw-r--r-- | plugins/timer/README.md | 17 | ||||
-rw-r--r-- | plugins/timer/timer.plugin.zsh | 29 | ||||
-rw-r--r-- | plugins/transfer/transfer.plugin.zsh | 4 | ||||
-rw-r--r-- | plugins/z/z.sh | 6 |
20 files changed, 266 insertions, 34 deletions
diff --git a/plugins/asdf/asdf.plugin.zsh b/plugins/asdf/asdf.plugin.zsh index 75395c718..38b225538 100644 --- a/plugins/asdf/asdf.plugin.zsh +++ b/plugins/asdf/asdf.plugin.zsh @@ -1,9 +1,11 @@ # Find where asdf should be installed ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}" +ASDF_COMPLETIONS="$ASDF_DIR/completions" # If not found, check for Homebrew package -if [[ ! -d $ASDF_DIR ]] && (( $+commands[brew] )); then +if [[ ! -f "$ASDF_DIR/asdf.sh" ]] && (( $+commands[brew] )); then ASDF_DIR="$(brew --prefix asdf)" + ASDF_COMPLETIONS="$ASDF_DIR/etc/bash_completion.d" fi # Load command @@ -11,7 +13,7 @@ if [[ -f "$ASDF_DIR/asdf.sh" ]]; then . "$ASDF_DIR/asdf.sh" # Load completions - if [[ -f "$ASDF_DIR/completions/asdf.bash" ]]; then - . "$ASDF_DIR/completions/asdf.bash" + if [[ -f "$ASDF_COMPLETIONS/asdf.bash" ]]; then + . "$ASDF_COMPLETIONS/asdf.bash" fi fi diff --git a/plugins/brew/README.md b/plugins/brew/README.md index aab55ea39..c129a7652 100644 --- a/plugins/brew/README.md +++ b/plugins/brew/README.md @@ -17,3 +17,5 @@ plugins=(... brew) | bubo | `brew update && brew outdated` | Fetch the newest version of Homebrew and all formulae, then list outdated formulae. | | bubc | `brew upgrade && brew cleanup` | Upgrade outdated, unpinned brews (with existing install options), then removes stale lock files and outdated downloads for formulae and casks, and removes old versions of installed formulae. | | bubu | `bubo && bubc` | Updates Homebrew, lists outdated formulae, upgrades oudated and unpinned formulae, and removes stale and outdated downloads and versions. | +| bcubo | `brew update && brew cask outdated` | Fetch the newest version of Homebrew and all formulae, then list outdated casks. | +| bcubc | `brew cask reinstall $(brew cask outdated) && brew cleanup` | Updates outdated casks, then runs cleanup. |
\ No newline at end of file diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index 60b81f8ec..cfbaa3480 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -4,6 +4,8 @@ alias brewsp='brew list --pinned' alias bubo='brew update && brew outdated' alias bubc='brew upgrade && brew cleanup' alias bubu='bubo && bubc' +alias bcubo='brew update && brew cask outdated' +alias bcubc='brew cask reinstall $(brew cask outdated) && brew cleanup' if command mkdir "$ZSH_CACHE_DIR/.brew-completion-message" 2>/dev/null; then print -P '%F{yellow}'Oh My Zsh brew plugin: diff --git a/plugins/cake/README.md b/plugins/cake/README.md new file mode 100644 index 000000000..aad92a3ec --- /dev/null +++ b/plugins/cake/README.md @@ -0,0 +1,15 @@ +# Cake + +This plugin provides completion for [CakePHP](https://cakephp.org/). + +To use it add cake to the plugins array in your zshrc file. + +```bash +plugins=(... cake) +``` + +## Note + +This plugin generates a cache file of the cake tasks found, named `.cake_task_cache`, in the current working directory. +It is regenerated when the Cakefile is newer than the cache file. It is advised that you add the cake file to your +`.gitignore` files. diff --git a/plugins/emacs/emacs.plugin.zsh b/plugins/emacs/emacs.plugin.zsh index db0ab13af..934c8d673 100644 --- a/plugins/emacs/emacs.plugin.zsh +++ b/plugins/emacs/emacs.plugin.zsh @@ -16,7 +16,7 @@ if "$ZSH/tools/require_tool.sh" emacsclient 24 2>/dev/null ; then # set EDITOR if not already defined. export EDITOR="${EDITOR:-${EMACS_PLUGIN_LAUNCHER}}" - alias emacs="$EMACS_PLUGIN_LAUNCHER --no-wait" + alias emacs="$EMACS_PLUGIN_LAUNCHER -t" alias e=emacs # open terminal emacsclient alias te="$EMACS_PLUGIN_LAUNCHER -nw" diff --git a/plugins/extract/README.md b/plugins/extract/README.md index c6bdd36dd..83b878c32 100644 --- a/plugins/extract/README.md +++ b/plugins/extract/README.md @@ -19,6 +19,7 @@ plugins=(... extract) | `7z` | 7zip file | | `Z` | Z archive (LZW) | | `apk` | Android app file | +| `aar` | Android library file | | `bz2` | Bzip2 file | | `deb` | Debian package | | `gz` | Gzip file | diff --git a/plugins/extract/_extract b/plugins/extract/_extract index 3baefa339..33d49fcc5 100644 --- a/plugins/extract/_extract +++ b/plugins/extract/_extract @@ -3,5 +3,5 @@ _arguments \ '(-r --remove)'{-r,--remove}'[Remove archive.]' \ - "*::archive file:_files -g '(#i)*.(7z|Z|apk|bz2|deb|gz|ipsw|jar|lzma|rar|sublime-package|tar|tar.bz2|tar.gz|tar.xz|tar.zma|tbz|tbz2|tgz|tlz|txz|war|whl|xpi|xz|zip)(-.)'" \ + "*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|gz|ipsw|jar|lzma|rar|sublime-package|tar|tar.bz2|tar.gz|tar.xz|tar.zma|tbz|tbz2|tgz|tlz|txz|war|whl|xpi|xz|zip)(-.)'" \ && return 0 diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index 4c72ce870..5e9b9ff24 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -46,7 +46,7 @@ extract() { (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; (*.z) uncompress "$1" ;; - (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk|*.whl) unzip "$1" -d $extract_dir ;; + (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;; (*.rar) unrar x -ad "$1" ;; (*.7z) 7za x "$1" ;; (*.deb) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 45a706173..12400ede4 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -112,8 +112,8 @@ ggf() { git push --force origin "${b:=$1}" } ggfl() { -[[ "$#" != 1 ]] && local b="$(git_current_branch)" -git push --force-with-lease origin "${b:=$1}" + [[ "$#" != 1 ]] && local b="$(git_current_branch)" + git push --force-with-lease origin "${b:=$1}" } compdef _git ggf=git-checkout @@ -155,10 +155,10 @@ compdef _git ggu=git-checkout alias ggpur='ggu' compdef _git ggpur=git-checkout -alias ggpull='git pull origin $(git_current_branch)' +alias ggpull='git pull origin "$(git_current_branch)"' compdef _git ggpull=git-checkout -alias ggpush='git push origin $(git_current_branch)' +alias ggpush='git push origin "$(git_current_branch)"' compdef _git ggpush=git-checkout alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)' diff --git a/plugins/jenv/jenv.plugin.zsh b/plugins/jenv/jenv.plugin.zsh index 14c586be9..2eda8037b 100644 --- a/plugins/jenv/jenv.plugin.zsh +++ b/plugins/jenv/jenv.plugin.zsh @@ -1,4 +1,4 @@ -jenvdirs=("$HOME/.jenv" "/usr/local/jenv" "/opt/jenv") +jenvdirs=("$HOME/.jenv" "/usr/local" "/usr/local/jenv" "/opt/jenv") FOUND_JENV=0 for jenvdir in $jenvdirs; do diff --git a/plugins/laravel/README.md b/plugins/laravel/README.md index 067c1e9fb..44798b68d 100644 --- a/plugins/laravel/README.md +++ b/plugins/laravel/README.md @@ -1,19 +1,40 @@ -# Laravel plugin +# Laravel This plugin adds aliases and autocompletion for Laravel [Artisan](https://laravel.com/docs/artisan) and [Bob](http://daylerees.github.io/laravel-bob/) command-line interfaces. -**NOTE:** completion might not work for recent Laravel versions since it hasn't been updated since 2012. -In that case, check out plugins `laravel4` and `laravel5`. - -To use it, add `laravel` to the plugins array in your zshrc file: - -```zsh +``` plugins=(... laravel) ``` -## Aliases +| Alias | Description | +|:-:|:-:| +| `artisan` | `php artisan` | +| `pas` | `php artisan serve` | + +## Database + +| Alias | Description | +|:-:|:-:| +| `pam` | `php artisan migrate` | +| `pamf` | `php artisan migrate:fresh` | +| `pamfs` | `php artisan migrate:fresh --seed` | +| `pamr` | `php artisan migrate:rollback` | +| `pads` | `php artisan db:seed` | + +## Makers + +| Alias | Description | +|:-:|:-:| +| `pamm` | `php artisan make:model` | +| `pamc` | `php artisan make:controller` | +| `pams` | `php artisan make:seeder` | +| `pamt` | `php artisan make:test` | + +## Clears -| Alias | Command | Description | -|-----------|--------------------------|----------------------| -| artisan | `php artisan` | Main Artisan command | -| bob | `php artisan bob::build` | Main Bob command | +| Alias | Description | +|:-:|:-:| +| `pacac` | `php artisan cache:clear` | +| `pacoc` | `php artisan config:clear` | +| `pavic` | `php artisan view:clear` | +| `paroc` | `php artisan route:clear` | diff --git a/plugins/laravel/laravel.plugin.zsh b/plugins/laravel/laravel.plugin.zsh index ed932ee89..7ddfd85ba 100644 --- a/plugins/laravel/laravel.plugin.zsh +++ b/plugins/laravel/laravel.plugin.zsh @@ -1,3 +1,26 @@ #!zsh alias artisan='php artisan' alias bob='php artisan bob::build' + +# Development +alias pas='php artisan serve' + +# Database +alias pam='php artisan migrate' +alias pamf='php artisan migrate:fresh' +alias pamfs='php artisan migrate:fresh --seed' +alias pamr='php artisan migrate:rollback' +alias pads='php artisan db:seed' + +# Makers +alias pamm='php artisan make:model' +alias pamc='php artisan make:controller' +alias pams='php artisan make:seeder' +alias pamt='php artisan make:test' + + +# Clears +alias pacac='php artisan cache:clear' +alias pacoc='php artisan config:clear' +alias pavic='php artisan view:clear' +alias paroc='php artisan route:clear' diff --git a/plugins/osx/spotify b/plugins/osx/spotify index 2ab98d3a0..b4215dbe7 100644 --- a/plugins/osx/spotify +++ b/plugins/osx/spotify @@ -1,7 +1,7 @@ #!/usr/bin/env bash function spotify() { -# Copyright (c) 2012--2017 Harish Narayanan <mail@harishnarayanan.org> +# Copyright (c) 2012--2018 Harish Narayanan <mail@harishnarayanan.org> # # Contains numerous helpful contributions from Jorge Colindres, Thomas # Pritchard, iLan Epstein, Gabriele Bonetti, Sean Heller, Eric Martin @@ -134,8 +134,13 @@ showStatus () { if [ $# = 0 ]; then showHelp; else + if [ ! -d /Applications/Spotify.app ] && [ ! -d $HOME/Applications/Spotify.app ]; then + echo "The Spotify application must be installed." + exit 1 + fi + if [ $(osascript -e 'application "Spotify" is running') = "false" ]; then - osascript -e 'tell application "Spotify" to activate' + osascript -e 'tell application "Spotify" to activate' || exit 1 sleep 2 fi fi @@ -160,7 +165,7 @@ while [ $# -gt 0 ]; do showAPIHelp; exit 1; fi - SHPOTIFY_CREDENTIALS=$(printf "${CLIENT_ID}:${CLIENT_SECRET}" | base64 | tr -d "\n"); + SHPOTIFY_CREDENTIALS=$(printf "${CLIENT_ID}:${CLIENT_SECRET}" | base64 | tr -d "\n"|tr -d '\r'); SPOTIFY_PLAY_URI=""; getAccessToken() { diff --git a/plugins/ros/README.mkd b/plugins/ros/README.mkd new file mode 100644 index 000000000..83573e499 --- /dev/null +++ b/plugins/ros/README.mkd @@ -0,0 +1,10 @@ +# Roswell Plugin + +This plugin adds completions and aliases for [Roswell](https://github.com/roswell/roswell/). + +To use it, add `ros` to the plugins array in your zshrc file: + +```zsh +plugins=(... ros) +``` + diff --git a/plugins/ros/_ros b/plugins/ros/_ros new file mode 100644 index 000000000..6a04d3c8f --- /dev/null +++ b/plugins/ros/_ros @@ -0,0 +1,64 @@ +#compdef ros +#autoload + +# roswell zsh completion, based on gem completion + +local -a _1st_arguments +_1st_arguments=( +'run: Run repl' +'install:Install a given implementation or a system for roswell environment' +'update:Update installed systems.' +'build:Make executable from script.' +'use:Change default implementation.' +'init:a new ros script, optionally based on a template.' +'fmt:Indent lisp source.' +'list:Information' +'template:[WIP] Manage templates' +'delete:Delete installed implementations' +'config:Get and set options' +'version:Show the roswell version information' +"help:Use \"ros help [command]\" for more information about a command."$'\n\t\t'"Use \"ros help [topic]\" for more information about the topic." +) + +#local expl + +_arguments \ + '(--version)'--version'[Print version information and quit]' \ + '(-w --wrap)'{-w,--wrap}'[\[CODE\] Run roswell with a shell wrapper CODE]' \ + '(-m --image)'{-m,--image}'[\[IMAGE\] continue from Lisp image IMAGE]' \ + '(-M --module)'{-M,--module}'[\[NAME\] Execute ros script found in ROSWELLPATH. (pythons -m)]' \ + '(-L --lisp)'{-L,--lisp}'[\[NAME\] Run roswell with a lisp impl NAME\[/VERSION\].]' \ + '(-l --load)'{-l,--load}'[\[FILE\] load lisp FILE while building]' \ + '(-S --source-registry)'{-S,--source-registry}'[\[X\] override source registry of asdf systems]' \ + '(-s --system --load-system)'{-s,--system,--load-system}'[\[SYSTEM\] load asdf SYSTEM while building]' \ + '(-p --package)'{-p,--package}'[\[PACKAGE\] change current package to \[PACKAGE\]]' \ + '(-sp --system-package)'{-sp,--system-package}'[\[SP\] combination of -s \[SP\] and -p \[SP\]]' \ + '(-e --eval)'{-e,--eval}'[\[FORM\] evaluate \[FORM\] while building]' \ + '--require'--require'[\[MODULE\] require \[MODULE\] while building]' \ + '(-q --quit)'{-q,--quit}'[quit lisp here]' \ + '(-r --restart)'{-r,--restart}'[\[FUNC\] restart from build by calling (\[FUNC\])]' \ + '(-E --entry)'{-E,--entry}'[\[FUNC\] restart from build by calling (\[FUNC\] argv)]' \ + '(-i --init)'{-i,--init}'[\[FORM\] evaluate \[FORM\] after restart]' \ + '(-ip --print)'{-ip,--print}'[\[FORM\] evaluate and princ \[FORM\] after restart]' \ + '(-iw --write)'{-iw,--write}'[\[FORM\] evaluate and write \[FORM\] after restart]' \ + '(-F --final)'{-F,--final}'[\[FORM\] evaluate \[FORM\] before dumping IMAGE]' \ + '(\+R --no-rc)'{\+R,--no-rc}'[skip /etc/rosrc, ~/.roswell/init.lisp]' \ + '(-A --asdf)'{-A,--asdf}'[use new asdf]' \ + '(\+Q --no-quicklisp)'{\+Q,--no-quicklisp}'[do not use quicklisp]' \ + '(-v --verbose)'{-v,--verbose}'[be quite noisy while building]' \ + '--quiet'--quiet'[be quite quiet while building default]' \ + '--test'--test'[for test purpose]' \ + '*:: :->subcmds' && return 0 + + +if (( CURRENT == 1 )); then + _describe -t commands "ros subcommand" _1st_arguments + return +fi + +# _files +case "$words[1]" in + -l|--load) + _files + ;; +esac diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index fe4946c6d..a7a4ee33a 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -2,20 +2,51 @@ typeset _agent_forwarding _ssh_env_cache function _start_agent() { local lifetime - local -a identities - - # start ssh-agent and setup environment zstyle -s :omz:plugins:ssh-agent lifetime lifetime + # start ssh-agent and setup environment + echo starting ssh-agent... ssh-agent -s ${lifetime:+-t} ${lifetime} | sed 's/^echo/#echo/' >! $_ssh_env_cache chmod 600 $_ssh_env_cache . $_ssh_env_cache > /dev/null +} - # load identies +function _add_identities() { + local id line sig + local -a identities loaded_sigs loaded_ids not_loaded zstyle -a :omz:plugins:ssh-agent identities identities - echo starting ssh-agent... - ssh-add $HOME/.ssh/${^identities} + # check for .ssh folder presence + if [[ ! -d $HOME/.ssh ]]; then + return + fi + + # add default keys if no identities were set up via zstyle + # this is to mimic the call to ssh-add with no identities + if [[ ${#identities} -eq 0 ]]; then + # key list found on `ssh-add` man page's DESCRIPTION section + for id in id_rsa id_dsa id_ecdsa id_ed25519 identity; do + # check if file exists + [[ -f "$HOME/.ssh/$id" ]] && identities+=$id + done + fi + + # get list of loaded identities' signatures and filenames + for line in ${(f)"$(ssh-add -l)"}; do + loaded_sigs+=${${(z)line}[2]} + loaded_ids+=${${(z)line}[3]} + done + + # add identities if not already loaded + for id in $identities; do + # check for filename match, otherwise try for signature match + if [[ ${loaded_ids[(I)$HOME/.ssh/$id]} -le 0 ]]; then + sig="$(ssh-keygen -lf "$HOME/.ssh/$id" | awk '{print $2}')" + [[ ${loaded_sigs[(I)$sig]} -le 0 ]] && not_loaded+="$HOME/.ssh/$id" + fi + done + + [[ -n "$not_loaded" ]] && ssh-add ${^not_loaded} } # Get the filename to store/lookup the environment from @@ -42,6 +73,8 @@ else _start_agent fi +_add_identities + # tidy up after ourselves unset _agent_forwarding _ssh_env_cache -unfunction _start_agent +unfunction _start_agent _add_identities diff --git a/plugins/timer/README.md b/plugins/timer/README.md new file mode 100644 index 000000000..321307e59 --- /dev/null +++ b/plugins/timer/README.md @@ -0,0 +1,17 @@ +This plugin allows to display command's execution time in a very nonintrusive way. + +Timer can be tuned by these two variables: +* `TIMER_PRECISION` allows to control number of decimal places (default `1`) +* `TIMER_FORMAT` allows to adjust display format (default `'/%d'`) + +Sample session: + + me@here:~$ sleep 1 /1.0s + me@here:~$ sleep 73 /1m13.0s + me@here:~$ TIMER_FORMAT='[%d]'; TIMER_PRECISION=2 [0.00s] + me@here:~$ head -c50 < /dev/urandom | hexdump + 0000000 b2 16 20 f0 29 1f 61 2d 8a 29 20 8c 8c 39 5a ab + 0000010 21 47 0e f9 ee a4 76 46 71 9e 4f 6b a4 c4 51 cb + 0000020 f9 1f 7e b9 6f 2c ae dd cf 40 6d 64 a8 fb d3 db + 0000030 09 37 + 0000032 [0.02s] diff --git a/plugins/timer/timer.plugin.zsh b/plugins/timer/timer.plugin.zsh new file mode 100644 index 000000000..231134e7d --- /dev/null +++ b/plugins/timer/timer.plugin.zsh @@ -0,0 +1,29 @@ +__timer_current_time() { + perl -MTime::HiRes=time -e'print time' +} + +__timer_format_duration() { + local mins=$(printf '%.0f' $(($1 / 60))) + local secs=$(printf "%.${TIMER_PRECISION:-1}f" $(($1 - 60 * mins))) + local duration_str=$(echo "${mins}m${secs}s") + local format="${TIMER_FORMAT:-/%d}" + echo "${format//\%d/${duration_str#0m}}" +} + +__timer_save_time_preexec() { + __timer_cmd_start_time=$(__timer_current_time) +} + +__timer_display_timer_precmd() { + if [ -n "${__timer_cmd_start_time}" ]; then + local cmd_end_time=$(__timer_current_time) + local tdiff=$((cmd_end_time - __timer_cmd_start_time)) + unset __timer_cmd_start_time + local tdiffstr=$(__timer_format_duration ${tdiff}) + local cols=$((COLUMNS - ${#tdiffstr} - 1)) + echo -e "\033[1A\033[${cols}C ${tdiffstr}" + fi +} + +preexec_functions+=(__timer_save_time_preexec) +precmd_functions+=(__timer_display_timer_precmd) diff --git a/plugins/transfer/transfer.plugin.zsh b/plugins/transfer/transfer.plugin.zsh index 7a7cd85ec..db744b0cd 100644 --- a/plugins/transfer/transfer.plugin.zsh +++ b/plugins/transfer/transfer.plugin.zsh @@ -61,7 +61,9 @@ transfer() { # cat output link cat $tmpfile + # add newline + echo # cleanup rm -f $tmpfile -}
\ No newline at end of file +} diff --git a/plugins/z/z.sh b/plugins/z/z.sh index 4fc75dc6a..5fe6d5266 100644 --- a/plugins/z/z.sh +++ b/plugins/z/z.sh @@ -222,10 +222,16 @@ if type compctl >/dev/null 2>&1; then if [ "$_Z_NO_RESOLVE_SYMLINKS" ]; then _z_precmd() { (_z --add "${PWD:a}" &) + # Reference $RANDOM to refresh its value inside the subshell + # Otherwise, multiple runs get the same value + : $RANDOM } else _z_precmd() { (_z --add "${PWD:A}" &) + # Reference $RANDOM to refresh its value inside the subshell + # Otherwise, multiple runs get the same value + : $RANDOM } fi [[ -n "${precmd_functions[(r)_z_precmd]}" ]] || { |