HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/zsh/functions/Zle/expand-absolute-path
# expand-absolute-path
# This is a ZLE widget to expand the absolute path to a file,
# using directory naming to shorten the path where possible.

emulate -L zsh
setopt extendedglob cbases

autoload -Uz modify-current-argument

if (( ! ${+functions[glob-expand-absolute-path]} )); then
  glob-expand-absolute-path() {
    local -a files
    files=(${~1}(N:P))
    (( ${#files} )) || return
    REPLY=${(D)files[1]}
  }
fi

modify-current-argument glob-expand-absolute-path