mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
cleanup: remove pointless no-op 'fc' and 'type' aliases
Both 'fc' and 'type' are already implemented as perfectly functional builtins -- in fact they use the exact same C function as 'hist' and 'whence', so the behaviour is clearly identical. Except 'type' was aliased to 'whence -v', but b_whence() contains explicit code to activate the v flag if invoked as 'type', so the alias is not needed for that either. It looks like someone decided to implement these aliases as proper builtins (as they should be; they are POSIX standard commands and 'unalias -a' must not get rid of them), but then forgot to remove these default aliases (and to update the man page). I'm not even doing a NEWS entry for this as there is no change in behaviour. The only difference is that you now get the correct command name in error and usage messages for 'fc' and 'type'. src/cmd/ksh93/data/aliases.c: - Remove fc='hist' and type='whence -v' default aliases. src/cmd/ksh93/sh.1: - Remove those default aliases from the list. - Document 'fc' and 'type' builtins. (cherry picked from commit c73af6a5a36a72c681201c9e9c397f98bbf2a86d)
This commit is contained in:
parent
61d9bca581
commit
b9f28bc508
2 changed files with 12 additions and 6 deletions
|
@ -34,7 +34,6 @@ const struct shtable2 shtab_aliases[] =
|
|||
#endif /* SHOPT_FS_3D */
|
||||
"autoload", NV_NOFREE, "typeset -fu",
|
||||
"compound", NV_NOFREE|BLT_DCL, "typeset -C",
|
||||
"fc", NV_NOFREE, "hist",
|
||||
"float", NV_NOFREE|BLT_DCL, "typeset -lE",
|
||||
"functions", NV_NOFREE, "typeset -f",
|
||||
"hash", NV_NOFREE, "alias -t --",
|
||||
|
@ -48,7 +47,6 @@ const struct shtable2 shtab_aliases[] =
|
|||
"stop", NV_NOFREE, "kill -s STOP",
|
||||
"suspend", NV_NOFREE, "kill -s STOP $$",
|
||||
#endif /*SIGTSTP */
|
||||
"type", NV_NOFREE, "whence -v",
|
||||
"", 0, (char*)0
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue