zsh-workers
 help / color / mirror / code / Atom feed
b85757600226e6276c2d7dc35457d38669c2ea93 blob 473 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 
# 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:A))
    (( ${#files} )) || return
    REPLY=${(D)files[1]}
  }
fi

modify-current-argument glob-expand-absolute-path
debug log:

solving b857576 ...
found b857576 in https://git.vuxu.org/mirror/zsh/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).