diff options
| author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-01-28 19:33:27 +0000 |
|---|---|---|
| committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2017-01-28 19:33:27 +0000 |
| commit | 34f70c5dc08bbecd20fbb8a1797851103fbad45e (patch) | |
| tree | 5170a04f299804c871a9c6ba913d5d07bfa576b2 /Src/hashtable.c | |
| parent | 40200: Updated Perforce completion (diff) | |
| download | zsh-34f70c5dc08bbecd20fbb8a1797851103fbad45e.tar zsh-34f70c5dc08bbecd20fbb8a1797851103fbad45e.tar.gz zsh-34f70c5dc08bbecd20fbb8a1797851103fbad45e.tar.bz2 zsh-34f70c5dc08bbecd20fbb8a1797851103fbad45e.tar.lz zsh-34f70c5dc08bbecd20fbb8a1797851103fbad45e.tar.xz zsh-34f70c5dc08bbecd20fbb8a1797851103fbad45e.tar.zst zsh-34f70c5dc08bbecd20fbb8a1797851103fbad45e.zip | |
40440: Add $functions_source hash to zsh/parameter.
This allows you to find out where a function was loaded from.
Diffstat (limited to 'Src/hashtable.c')
| -rw-r--r-- | Src/hashtable.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Src/hashtable.c b/Src/hashtable.c index 1f2789d07..8987c8597 100644 --- a/Src/hashtable.c +++ b/Src/hashtable.c @@ -1566,6 +1566,15 @@ dircache_set(char **name, char *value) *name = NULL; } else { /* + * As the function path has been resolved to a particular + * location, we'll store it as an absolute path. + */ + if (*value != '/') { + value = zhtricat(metafy(zgetcwd(), -1, META_HEAPDUP), + "/", value); + value = xsymlink(value, 1); + } + /* * We'll maintain the cache at exactly the right size rather * than overallocating. The rationale here is that typically * we'll get a lot of functions in a small number of directories |
