When displaying aliases in Korn shell (ksh) the closing quote is omitted. This happens with both predefined and user-defined aliases:
>> alias type r l ltr
type='whence -v
r='hist -s
l='pwd; ls
ltr='ls -ltrT
Bourne shell (sh) and Bash do show the expected closing quote:
>> alias l ltr
l='pwd; ls'
ltr='ls -ltrT'
Here's what the alias definitions in my ~/.kshrc look like. It doesn't seem to matter whether single quotes or double quotes are used:
alias l='pwd; ls'
alias ll="ls -l"
alias ltr="ls -ltrT"
I am running /bin/ksh in MacOS Monterey, Version 12.4 (The same problem appears in earlier versions of MacOS such as Catalina.)
Why does this happen? Is this a known bug? Is there away to correct it?
Thanks!