/
nerfur
/
openbsd-src
ОбзорДокументацияВойти
/
nerfur
/
openbsd-src
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
ДокументацияПоддержка
Политика конфиденциальностиПользовательское соглашениеПолитика использования «cookies»Согласие субъекта персональных данных
2026 ©
openbsd-src/
bin/ksh/
..
CONTRIBUTORS

I am retiring my old email address; replace it with my OpenBSD one.

8 лет назад
LEGAL

note non-free parts that got yanked years ago; tom.cosgrove@arches-consulting.com

23 года назад
Makefile

Add clear-screen emacs editing command, currently not bound to a key by default. The shell will query the terminfo database to find the escape sequence to clear the screen. OK deraadt@

8 лет назад
NOTES

Some more tweaks to NOTES

9 лет назад
PROJECTS

Kill entries that are obviously outdated/out of scope

9 лет назад
README

a little tidy up; from raf czlonka

9 лет назад
alloc.c

Introduce internal_warningf() and mark internal_errorf() as noreturn

9 лет назад
c_ksh.c

correct indentation; no functional change ok tb@

2 года назад
c_sh.c

sh(1), ksh(1): reimplement p_tv() with p_ts()

3 года назад
c_test.c

Use timespeccmp() and st_mtim intead of comparing st_mtime.

год назад
c_test.h

Ansification plus some minor knf. No binary change on i386 and sparc64, binary change in lex.o on macppc due to introduction of dopprompt() prototype. ok millert@

22 года назад
c_ulimit.c

When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.

7 лет назад
config.h

Stop pretending we support building ksh without EDIT/HISTORY support

9 лет назад
edit.c

correct indentation; no functional change ok tb@

2 года назад
edit.h

ksh: escape control chars when displaying file name completions. If there are multiple matches when using autocomplete, the list of matching file names was output as-is. However, for a single match, control characters are escaped before the file name is displayed. This makes the behavior more consistent by escaping control chars in the list of matches too. Discussed with deraadt@, OK op@

3 года назад
emacs.c

ksh: escape control chars when displaying file name completions. If there are multiple matches when using autocomplete, the list of matching file names was output as-is. However, for a single match, control characters are escaped before the file name is displayed. This makes the behavior more consistent by escaping control chars in the list of matches too. Discussed with deraadt@, OK op@

3 года назад
eval.c

ksh: make $(< filename) error output include the errno string. This is more consistent with how bash, zsh and ksh93 behave and makes $(< filename) more of a drop-in replacment for $(cat filename). OK kn@ florian@

3 года назад
exec.c

ksh: escape control chars when displaying file name completions. If there are multiple matches when using autocomplete, the list of matching file names was output as-is. However, for a single match, control characters are escaped before the file name is displayed. This makes the behavior more consistent by escaping control chars in the list of matches too. Discussed with deraadt@, OK op@

3 года назад
expand.h

Bring back the sign compare changes, this time with a fix from otto@ that fixes the issues seen on hppa. OK deraadt@ otto@

9 лет назад
expr.c

When evaluating an arithmetical expression, for example inside $(()), never do substitution (neither parameter, nor command, nor arithmetic, nor tilde substitution) on the values of any variables encountered inside the expression, but do recursively perform arithmetical evaluation of subexpressions as required. This makes behaviour more consistent, without hindering any behaviour promised in the manual page.

7 лет назад
history.c

inline `start' and simplify; from/ok millert@

2 года назад
io.c

Add #include <stdlib.h> for mkstemp. Spotted by maya@netbsd

7 лет назад
jobs.c

Add support for set -o pipefail

6 лет назад
ksh.1

for "case", note that opening "(" and final ";;" are optional (text lifted from sh.1);

год назад
lex.c

gmtime(3) / locatime(3) can fail when timestamps are way off.

2 года назад
lex.h

Stop pretending we support building ksh without EDIT/HISTORY support

9 лет назад
mail.c

Fix three more buglets: 1. Another off-by-one: if a mail file name ends in an (escaped) percent sign, do not forget to check whether the next byte is the percent sign introducing the message (MAILPATH='filename\%%msg'). 2. If the message is empty, use the default message rather than printing a blank line (MAILPATH='filename%'). 3. If the file name is empty, don't bother with mballoc(): the subsequent stat(2) can never succeed. (MAILPATH='%msg'). Found while reviewing the previous commit by tedu@. OK tedu@.

8 лет назад
main.c

avoid MAIL* environment variables to save a few bytes in install media

3 года назад
misc.c

when getopts prints "unknown option" or "requires argument", it should not print the shell script line number where this occured. Doing so is pointless, or an information leak. This change does not affect any other error reporting. ok millert

5 лет назад
path.c

When system calls indicate an error they return -1, not some arbitrary value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.

7 лет назад
sh.1

add missing Ev macro; from mail at lukasneukom ch

2 года назад
sh.h

ksh: escape control chars when displaying file name completions. If there are multiple matches when using autocomplete, the list of matching file names was output as-is. However, for a single match, control characters are escaped before the file name is displayed. This makes the behavior more consistent by escaping control chars in the list of matches too. Discussed with deraadt@, OK op@

3 года назад
shf.c

If during parsing lines in the script, ksh finds a NUL byte on the line, it should abort ("syntax error: NUL byte unexpected"). There appears to be one piece of software which is misinterpreting guidance of this, and trying to depend upon embedded NUL. During research, every shell we tested has one or more cases where a NUL byte in the input or inside variable contents will create divergent behaviour from other shells. (ie. gets converted to a space, is silently skipped, or aborts script parsing or later execution). All the shells are written in C, and majority of them use C strings for everything, which means they cannot embed a NUL, so this is not surprising. It is quite unbelievable there are people trying to rewrite history on a lark, and expecting the world to follow alone.

2 года назад
shf.h

Remove a superfluous macro. No binary change. ok tb@

11 лет назад
syn.c

Do not permit an empty list between "while" and "do". This avoids a cpu loop for "while do done" and is consistent with the behavior of AT&T ksh and most other shells. OK jca@ halex@

5 лет назад
table.c

Introduce internal_warningf() and mark internal_errorf() as noreturn

9 лет назад
table.h

Add clear-screen emacs editing command, currently not bound to a key by default. The shell will query the terminfo database to find the escape sequence to clear the screen. OK deraadt@

8 лет назад
trap.c

Fix kill [-SIGNAME | -s SIGNAME] and simplify

8 лет назад
tree.c

Support 64 bit integers on 32 bit architectures.

8 лет назад
tree.h

Remove three distracting aliases for NULL.

11 лет назад
tty.c

For open/openat, if the flags parameter does not contain O_CREAT, the 3rd (variadic) mode_t parameter is irrelevant. Many developers in the past have passed mode_t (0, 044, 0644, or such), which might lead future people to copy this broken idiom, and perhaps even believe this parameter has some meaning or implication or application. Delete them all. This comes out of a conversation where tb@ noticed that a strange (but intentional) pledge behaviour is to always knock-out high-bits from mode_t on a number of system calls as a safety factor, and his bewilderment that this appeared to be happening against valid modes (at least visually), but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef. ok millert

5 лет назад
tty.h

Remove EXTERN from tty.[ch], from Michael McConville. No binary change.

11 лет назад
var.c

avoid MAIL* environment variables to save a few bytes in install media

3 года назад
version.c

pdksh-5.2.14

27 лет назад
vi.c

Minor improvement of the "move right by character" command ('l', SPACE) in VI editing mode. If we are on the first byte in the command line and it is a UTF-8 continuation byte, then it actually takes up a column in the terminal, which typically displays U+FFFD REPLACEMENT CHARACTER. Consequently, moving past this byte should consume one right movement. OK lucas@

год назад
README
$OpenBSD: README,v 1.16 2017/05/11 20:17:17 jmc Exp $
 
Last updated Jul '99 for pdksh-5.2.14.
 
PDksh is a mostly complete AT&T ksh look-alike (see NOTES file for a list
of things not supported). Work is mostly finished to make it fully
compatible with both POSIX and AT&T ksh (when the two don't conflict).
 
PDksh was being maintained by Michael Rendell (michael@cs.mun.ca),
who took over from Simon J. Gerraty (sjg@zen.void.oz.au) at the latter's
suggestion.
 
Files of interest:
CONTRIBUTORS short history of pdksh, people who contributed, etc.
NOTES lists of known bugs in pdksh, at&t ksh, and posix.
PROJECTS list of things that need to be done in pdksh.
LEGAL A file detailing legal issues concerning pdksh.
 
 
BTW, THE MOST FREQUENTLY REPORTED BUG IS
echo hi | read a; echo $a # Does not print hi
I'm aware of this and there is no need to report it.