mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
'whence -a' bases the path for tracked aliases on the user's current working directory if an enabled ksh builtin of the same name is also available. The following example will claim 'cat' is in the user's current working directory: $ whence -a cat cat is a tracked alias for /usr/bin/cat $ builtin cat $ whence -a cat cat is a shell builtin cat is /usr/bin/cat cat is a tracked alias for /current/working/directory/cat This patch from ksh2020 fixes this problem by properly saving the path of the tracked alias for use with 'whence -a', since 'path_pwd' (as implied by the function's name) only gets the users current working directory, not the location of tracked aliases. Ref.: https://github.com/att/ast/issues/1049 This bug was originally reported by David Morano about two decades ago to the AST team: https://github.com/att/ast/issues/954 src/cmd/ksh93/bltins/whence.c: - Print the actual path of a tracked alias, path_pwd doesn't have this functionality. src/cmd/ksh93/include/name.h: - Add 'pathcomp' for saving the value of tracked aliases. src/cmd/ksh93/sh/path.c: - Save the value of tracked aliases for use by whence. src/cmd/ksh93/tests/builtins.sh: - Add a regression test for using 'whence -a' on tracked aliases with a builtin equivalent. |
||
|---|---|---|
| .. | ||
| builtin | ||
| INIT | ||
| ksh93 | ||
| Makefile | ||
| Mamfile | ||