1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

remove unused 'is an exported alias' message (re: 80d9ae2b)

Commit 80d9ae2b removed the line that set the NV_EXPORT flag on an
alias when the obsolete ksh88 'alias -x' option was used. But it
turns out that flag actually did something: it caused 'whence -v'
to report the alias as an exported alias -- misleadingly, because
exported aliases have never actually exised in ksh93. Since '-x' no
longer sets that flag, that message is never printed.

src/cmd/ksh93/data/msg.c,
src/cmd/ksh93/include/path.h:
- Remove is_xalias[] = "%s is an exported alias for " message.

src/cmd/ksh93/bltins/whence.c:
- Remove dead code to check for (formerly) exported alias.
This commit is contained in:
Martijn Dekker 2020-07-19 06:21:14 +01:00
parent 5521c39a9b
commit e9c7ac70a7
3 changed files with 1 additions and 6 deletions

View file

@ -170,10 +170,7 @@ static int whence(Shell_t *shp,char **argv, register int flags)
{
if(flags&V_FLAG)
{
if(nv_isattr(np,NV_EXPORT))
msg = sh_translate(is_xalias);
else
msg = sh_translate(is_alias);
msg = sh_translate(is_alias);
sfprintf(sfstdout,msg,name);
}
sfputr(sfstdout,sh_fmtq(cp),'\n');

View file

@ -138,7 +138,6 @@ const char is_builtin[] = " is a shell builtin";
const char is_spcbuiltin[] = " is a special shell builtin";
const char is_builtver[] = "is a shell builtin version of";
const char is_alias[] = "%s is an alias for ";
const char is_xalias[] = "%s is an exported alias for ";
const char is_talias[] = "is a tracked alias for";
const char is_function[] = " is a function";
const char is_ufunction[] = " is an undefined function";

View file

@ -127,7 +127,6 @@ extern const char is_spcbuiltin[];
extern const char is_builtver[];
extern const char is_reserved[];
extern const char is_talias[];
extern const char is_xalias[];
extern const char is_function[];
extern const char is_ufunction[];
#ifdef SHELLMAGIC