0

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!

6
  • Cannot reproduce. Where are those aliases defined? If it's in a file, does the file have \r\n line endings? Commented Jun 25, 2022 at 20:24
  • What version of ksh are you using? Commented Jun 25, 2022 at 22:15
  • Apple ships the last released ksh93, u+2012-08-01. I would recommend that anyone interested in ksh93 check out ksh93u+m, which fixes many many bugs. I can't reproduce this behavior in either ATT ksh93 or in ksh93u+m. Commented Jun 26, 2022 at 22:26
  • @glennjackman That's a very good question. The aliases are defined in my ~/.kshrc. The lines have \n endings (i.e. line feeds but not carriage returns). Commented Jun 28, 2022 at 23:05
  • @QuartzCristal I'm running Version AJM 93u+ 2012-08-01. Thanks. Commented Jun 28, 2022 at 23:13

0

You must log in to answer this question.

Browse other questions tagged .