OSDN Git Service

yash/yash.git
41 hours agoNon-zero exit status of shell error during EXIT trap trunk
WATANABE Yuki [Sat, 4 May 2024 02:53:57 +0000 (11:53 +0900)]
Non-zero exit status of shell error during EXIT trap

This commit backports test cases for traps from:
https://github.com/magicant/yash-rs/blob/905576f650221edfb99d4cb6461ce90d3a0489c2/yash-cli/tests/scripted_test/trap-p.sh

A fix is applied to support the new test cases.

8 days agoUse tab for indentation in Makefile feature testing
WATANABE Yuki [Sat, 27 Apr 2024 06:24:30 +0000 (15:24 +0900)]
Use tab for indentation in Makefile feature testing

Commit 34c1f28c accidentally modified the indentation to spaces where we
should be using tabs.

2 weeks ago$POST_PROMPT_COMMAND (#49)
WATANABE Yuki [Sat, 20 Apr 2024 13:53:26 +0000 (22:53 +0900)]
$POST_PROMPT_COMMAND (#49)

2 weeks agoPost-prompt command
WATANABE Yuki [Wed, 17 Apr 2024 15:31:09 +0000 (00:31 +0900)]
Post-prompt command

2 weeks agoRefactor input_interactive
WATANABE Yuki [Wed, 17 Apr 2024 15:11:27 +0000 (00:11 +0900)]
Refactor input_interactive

3 weeks agoAccount for existing backslashes in completion
WATANABE Yuki [Sun, 14 Apr 2024 05:10:19 +0000 (14:10 +0900)]
Account for existing backslashes in completion

The previous implementation assumed that there was no backslash escape
preceding the cursor when performing command line completion. This
caused a redundant backslash to be inserted when the next character in
the completed word needed escaping. After this commit, the shell checks
for an escape before the current position and removes it when inserting
the completion, leaving the correct number of backslashes.

Fixes https://github.com/magicant/yash/issues/47

3 weeks agoFine-tune gitignore
WATANABE Yuki [Sat, 13 Apr 2024 15:44:07 +0000 (00:44 +0900)]
Fine-tune gitignore

The pattern "*.1" is intended to match manpage files built in the "doc"
directory, but it was also matching distribution directories like
"yash-2.56.1". To avoid this mismatch, this commit adds the explicit
prefix to the pattern.

5 weeks agoDistribute archive in zstd
WATANABE Yuki [Sat, 30 Mar 2024 13:09:35 +0000 (22:09 +0900)]
Distribute archive in zstd

Zstd produces a bit larger archives than xz, but much faster.

6 weeks agoshare/completion/git-config: Fix completion for aliases
WATANABE Yuki [Wed, 20 Mar 2024 14:30:49 +0000 (23:30 +0900)]
share/completion/git-config: Fix completion for aliases

6 weeks agoVersion 2.56.1 2.56.1
WATANABE Yuki [Wed, 20 Mar 2024 13:14:06 +0000 (22:14 +0900)]
Version 2.56.1

6 weeks agoUpdate NEWS for share/completion/doas
WATANABE Yuki [Wed, 20 Mar 2024 13:01:55 +0000 (22:01 +0900)]
Update NEWS for share/completion/doas

6 weeks agoMilestone management in release procedure
WATANABE Yuki [Wed, 20 Mar 2024 04:55:35 +0000 (13:55 +0900)]
Milestone management in release procedure

6 weeks agoVersion 2.56 2.56
WATANABE Yuki [Wed, 20 Mar 2024 02:55:46 +0000 (11:55 +0900)]
Version 2.56

2 months agoAdd doas completions (#45)
WATANABE Yuki [Sun, 25 Feb 2024 04:22:22 +0000 (13:22 +0900)]
Add doas completions (#45)

2 months agoAdd doas completions
DanisDGK [Sat, 24 Feb 2024 18:26:09 +0000 (20:26 +0200)]
Add doas completions

3 months agotests/wait-p: Avoid race condition
WATANABE Yuki [Fri, 2 Feb 2024 16:07:53 +0000 (01:07 +0900)]
tests/wait-p: Avoid race condition

The test case 'trap interrupts wait' expects the last wait built-in to
finish successfully without an interruption by a signal. To make it
surely happen, the trap action should be uninstalled before waiting.

3 months agotests/wait-p: Don't depend on yash-specific behavior
WATANABE Yuki [Thu, 1 Feb 2024 15:55:23 +0000 (00:55 +0900)]
tests/wait-p: Don't depend on yash-specific behavior

Previously, the test case 'trap interrupts wait' assumed that the
asynchronous subshell ran as a direct child process of the main shell.
This assumption was not POSIXly-portable. The shell is allowed to run
the subshell in a child process of the asynchronous job's process, in
which case the job process might be terminated by SIGUSR2 before the
trap action is performed in the subshell.

This commit rewrites the test so that the test result does not depend on
the wait status for the subshell.

3 months agotests/kill4: Fix tests with wrong assumption
WATANABE Yuki [Wed, 31 Jan 2024 15:52:36 +0000 (00:52 +0900)]
tests/kill4: Fix tests with wrong assumption

Previously, some tests in kill4-p.tst depended on traps reacting to a
signal sent by the shell. Since the traps were set in subshells, the
processes executing the trap built-in might not be the direct child
processes of the shell. In that case, the children were terminated by
the signal, possibly before the subshells responded to the signal,
causing the subsequent wait built-in to return too early in the main
shell process.

To resolve this issue, the test cases are rewritten without using traps.

3 months agotests/bg: Don't require exact match for bg output
WATANABE Yuki [Sun, 7 Jan 2024 13:29:20 +0000 (22:29 +0900)]
tests/bg: Don't require exact match for bg output

The format of the command string displayed by the bg built-in is not
strictly specified by POSIX. ksh seems to print the entire command line
which may include the "&" symbol and other commands that are not part of
the job. Probably we should accept this as conformant.

5 months agoconfigure: Fall back to clang
WATANABE Yuki [Sat, 2 Dec 2023 03:11:06 +0000 (12:11 +0900)]
configure: Fall back to clang

Clang is a compiler that is highly compatible with GCC. When GCC is
unavailable, try looking for Clang.

5 months agoReplace INIT with DUMMY_INIT macro
WATANABE Yuki [Thu, 30 Nov 2023 14:56:19 +0000 (23:56 +0900)]
Replace INIT with DUMMY_INIT macro

This commit renames the macro so that it conveys the main use case of
initializing a variable with a dummy value.

The variable name is no longer part of the macro so that it can be used
for complex declarators such as function pointers.

5 months agoUpdate docs for emacs-search-*ward-current
WATANABE Yuki [Wed, 29 Nov 2023 14:13:51 +0000 (23:13 +0900)]
Update docs for emacs-search-*ward-current

5 months agoImplement emacs-search-{forward,backward}-current. (#37)
WATANABE Yuki [Wed, 29 Nov 2023 14:03:28 +0000 (23:03 +0900)]
Implement emacs-search-{forward,backward}-current. (#37)

5 months agoImplement emacs-search-{forward,backward}-current.
Edd Barrett [Mon, 20 Nov 2023 14:33:35 +0000 (14:33 +0000)]
Implement emacs-search-{forward,backward}-current.

These are emacs search variants that initialise the search buffer with
the current contents of the line edit buffer. This can save the user
some keystrokes if they want to search for something they've already
typed.

Users may find the following bindings useful:

```
bindkey -e '\^R' emacs-search-backward-current
bindkey -e '\^S' emacs-search-forward-current
```

5 months agoUpdate comments in tests
WATANABE Yuki [Fri, 24 Nov 2023 13:23:56 +0000 (22:23 +0900)]
Update comments in tests

Mksh supports "eval break" and "eval continue" as of R55.

5 months agoRewrite readonly-p.tst
WATANABE Yuki [Thu, 23 Nov 2023 13:44:40 +0000 (22:44 +0900)]
Rewrite readonly-p.tst

The previous tests contained redundant commands that were not run as a
consequence of the preceding assignment failing. This patch removes
those redundant commands and adds comments to explain the expected
behavior.

Code copied from:
https://github.com/magicant/yash-rs/commit/a0bed0f2e0af33016e2a5903d42afff851d611e8

5 months agoMore comments in export-p.tst
WATANABE Yuki [Thu, 23 Nov 2023 13:44:29 +0000 (22:44 +0900)]
More comments in export-p.tst

Code copied from:
https://github.com/magicant/yash-rs/commit/f5dca5daa63a27e9b4cd120359841fef7c8648a2

5 months agoIgnore reindentation commit in git-blame
WATANABE Yuki [Mon, 13 Nov 2023 16:10:57 +0000 (01:10 +0900)]
Ignore reindentation commit in git-blame

5 months agoConvert to indentation by spaces
WATANABE Yuki [Mon, 13 Nov 2023 15:42:43 +0000 (00:42 +0900)]
Convert to indentation by spaces

The indentation by mixed spaces and tabs is not friendly with editors
other than Vim. This commit converts to indentation by spaces only.

5 months agoDon't overrun buffer in emacs-capitalize-word
WATANABE Yuki [Sun, 12 Nov 2023 04:14:20 +0000 (13:14 +0900)]
Don't overrun buffer in emacs-capitalize-word

If the `emacs-capitalize-word` line-editing command is invoked with the
cursor at the end of the buffer, the command should not update the
buffer. We need a boundary check before updating the buffer and
incrementing the cursor position.

Fixes https://github.com/magicant/yash/issues/33

6 months agoDon't print redundant # in ${foo:/bar/baz}
WATANABE Yuki [Fri, 13 Oct 2023 14:25:07 +0000 (23:25 +0900)]
Don't print redundant # in ${foo:/bar/baz}

7 months agoDon't define FD_SETSIZE on Cygwin
WATANABE Yuki [Mon, 18 Sep 2023 02:58:53 +0000 (11:58 +0900)]
Don't define FD_SETSIZE on Cygwin

This reverts commit fc960895a3c44fb3f11c5f7c78c00e8f6f64e32a.

The current version of Cygwin defines FD_SETSIZE as 1024, which is
larger than our definition and allows using more file descriptors.

7 months agoAdd issue templates
WATANABE Yuki [Sun, 10 Sep 2023 16:25:35 +0000 (01:25 +0900)]
Add issue templates

7 months agoUpdate link to translation guide in README
WATANABE Yuki [Sun, 10 Sep 2023 14:06:47 +0000 (23:06 +0900)]
Update link to translation guide in README

7 months agoAdd extra test to release process
WATANABE Yuki [Sun, 10 Sep 2023 13:07:08 +0000 (22:07 +0900)]
Add extra test to release process

7 months agoTest double-hyphen operand on shell startup
WATANABE Yuki [Sun, 10 Sep 2023 03:15:27 +0000 (12:15 +0900)]
Test double-hyphen operand on shell startup

7 months agoExtract portable tests for shell startup
WATANABE Yuki [Sat, 9 Sep 2023 15:53:11 +0000 (00:53 +0900)]
Extract portable tests for shell startup

Some test cases in startup-y.tst were applicable for any POSIX shells.
This commit moves those cases to startup-p.tst.

Some test cases are modified to make them portable.
Some new test cases are added.

7 months agoAdd translation guide
WATANABE Yuki [Sat, 9 Sep 2023 14:12:30 +0000 (23:12 +0900)]
Add translation guide

Based on: https://osdn.net/projects/yash/wiki/HowToTranslate

7 months agoUpdate THANKS
WATANABE Yuki [Sat, 9 Sep 2023 13:39:23 +0000 (22:39 +0900)]
Update THANKS

7 months agoAdd RELEASING.md (#17)
WATANABE Yuki [Tue, 5 Sep 2023 15:59:28 +0000 (00:59 +0900)]
Add RELEASING.md (#17)

8 months agoUpdate documentation for GitHub migration (#17)
WATANABE Yuki [Mon, 4 Sep 2023 15:01:57 +0000 (00:01 +0900)]
Update documentation for GitHub migration (#17)

8 months agoUpdate README for GitHub migration (#17)
WATANABE Yuki [Sun, 3 Sep 2023 02:19:01 +0000 (11:19 +0900)]
Update README for GitHub migration (#17)

8 months agoCorrect 2.55 release date 2.55
WATANABE Yuki [Sat, 19 Aug 2023 16:06:04 +0000 (01:06 +0900)]
Correct 2.55 release date

8 months agoDon't let tests running in background suspend (#45760)
WATANABE Yuki [Sat, 19 Aug 2023 15:59:27 +0000 (00:59 +0900)]
Don't let tests running in background suspend (#45760)

The fix in commit d171ccc710a0041c0d7d1d1e66ea64d6034f300e (c4212) had a
bug that caused tests running in the background to be suspended. Since
"set -m" suspends the shell when run in the background, we should only
run it in the foreground.

8 months agoVersion 2.55
WATANABE Yuki [Sat, 19 Aug 2023 13:59:30 +0000 (22:59 +0900)]
Version 2.55

8 months agoFix translation in ja.po
WATANABE Yuki [Wed, 16 Aug 2023 16:24:33 +0000 (01:24 +0900)]
Fix translation in ja.po

8 months agoConvert READMEs to Markdown (#16)
WATANABE Yuki [Wed, 16 Aug 2023 16:15:47 +0000 (01:15 +0900)]
Convert READMEs to Markdown (#16)

8 months agoInterlink English and Japanese READMEs
Martin Fischer [Tue, 8 Aug 2023 15:20:55 +0000 (17:20 +0200)]
Interlink English and Japanese READMEs

8 months agoUse Markdown Links for links in Contributions section
Martin Fischer [Tue, 8 Aug 2023 15:12:04 +0000 (17:12 +0200)]
Use Markdown Links for links in Contributions section

8 months agoLinkify file mentions in READMEs
Martin Fischer [Tue, 8 Aug 2023 15:05:46 +0000 (17:05 +0200)]
Linkify file mentions in READMEs

8 months agoConvert READMEs to Markdown
Martin Fischer [Tue, 8 Aug 2023 14:59:19 +0000 (16:59 +0200)]
Convert READMEs to Markdown

9 months agoMake run-test.sh POSIXly-portable
WATANABE Yuki [Sun, 16 Jul 2023 16:07:52 +0000 (01:07 +0900)]
Make run-test.sh POSIXly-portable

In this commit, the test runner script and test cases are modified in an
attempt to make the test runner runnable not only on yash but also on
any POSIX shell. Changes are also applied in this commit to work around
some bugs in existing shells. Below is a summary of the changes made in
this commit:

* The test runner script no longer aborts when run on a shell other than
  yash.
* The non-portable "-X" option for the "export" command is no longer
  used.
* Redirection error on the "exec" built-in aborts the POSIX shell, so file
  descriptors are now tested without a command.
* Test cases should not assume a particular process forking strategy for
  subshells, so the test for $PPID is rewritten.
* Some shells including dash and zsh would not like to have some shell
  variables unset. The $OPTARG variable is no longer unset.
* The "command -v" command does not print a correct absolute pathname to
  the given command on some shells including dash, hence the redundant
  "absolute" call.
* Some shells print an error message when a process is killed by a
  signal, which was causing some test cases to fail unexpectedly.
  Redirections on the testee are now applied in a subshell so that the
  message does not affect the test result.
* Ksh seems to be tricked by file descriptors applied for other
  commands. To avoid false failures, unused file descriptors are
  explicitly closed when calling the "testcase" function.

Unfortunately, at the time of this commit, only Bash is known to run all
the tests successfully other than yash. Dash, ksh, mksh, and zsh each
have unresolved issues that prevent the tests from being run
successfully. It is unknown whether those issues are due to bugs in the
shells or in the tests.

9 months agoRemove non-portable pathname expansion test
WATANABE Yuki [Sat, 22 Jul 2023 15:42:23 +0000 (00:42 +0900)]
Remove non-portable pathname expansion test

9 months agoAmend if command test cases
WATANABE Yuki [Sat, 22 Jul 2023 02:35:35 +0000 (11:35 +0900)]
Amend if command test cases

9 months agoMove non-portable test from exec-p.tst to exec-y.tst
WATANABE Yuki [Thu, 20 Jul 2023 15:32:35 +0000 (00:32 +0900)]
Move non-portable test from exec-p.tst to exec-y.tst

The definition of the $PATH variable in POSIX states that the search
behavior is unspecified when the variable value is empty.

9 months agoImport some tests from yash-rs
WATANABE Yuki [Tue, 18 Jul 2023 16:20:43 +0000 (01:20 +0900)]
Import some tests from yash-rs

Copied from:
https://github.com/magicant/yash-rs/commit/66e0781ae34fb98d7a590f72f5417b9b2932e44b

11 months agodoc/ja/_read: Amend obsolete description
WATANABE Yuki [Sun, 28 May 2023 03:11:39 +0000 (12:11 +0900)]
doc/ja/_read: Amend obsolete description

11 months agoGive default key binding for \et
WATANABE Yuki [Thu, 11 May 2023 15:38:02 +0000 (00:38 +0900)]
Give default key binding for \et

There seems to be some termcap databases that define the "kent"
capability for the Enter key. The shell should provide a default key
binding that makes Enter just work like Ctrl-M.

cf. https://tty0.social/@JdeBP/110337559845913255

11 months agoUpdate NEWS
WATANABE Yuki [Tue, 9 May 2023 14:47:30 +0000 (23:47 +0900)]
Update NEWS

12 months agocompletion/pass: support pass
Victorien Elvinger [Fri, 21 Apr 2023 18:02:24 +0000 (20:02 +0200)]
completion/pass: support pass

12 months agoSuppress Valgrind memcheck false positives
WATANABE Yuki [Sun, 23 Apr 2023 15:11:07 +0000 (00:11 +0900)]
Suppress Valgrind memcheck false positives

For testing on Fedora 38.

12 months agocompletion/git-switch: support git-switch
Victorien Elvinger [Wed, 19 Apr 2023 16:34:22 +0000 (18:34 +0200)]
completion/git-switch: support git-switch

12 months agotests: Skip SIGWINCH tests on unsupported platforms
magicant [Sat, 8 Apr 2023 10:10:01 +0000 (10:10 +0000)]
tests: Skip SIGWINCH tests on unsupported platforms

SIGWINCH is not a POSIXly-portable signal. We should ensure the signal
is supported on the platform before testing.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4243 048f04df-13f5-43d7-8114-9f9ceecaec24

12 months agoconfigure: Declare putchar only if it's not a macro (#47773)
magicant [Sat, 8 Apr 2023 10:09:59 +0000 (10:09 +0000)]
configure: Declare putchar only if it's not a macro (#47773)

c4200 added the declaration of the putchar function, but it breaks
compilation if any included header has defined it as a macro.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4242 048f04df-13f5-43d7-8114-9f9ceecaec24

12 months agoBind clear-and-redraw-all in sample (#45994)
magicant [Sat, 8 Apr 2023 02:44:16 +0000 (02:44 +0000)]
Bind clear-and-redraw-all in sample (#45994)

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4241 048f04df-13f5-43d7-8114-9f9ceecaec24

12 months agoSupport argument to {clear-and-,}redraw-all (#45994)
magicant [Fri, 7 Apr 2023 15:22:42 +0000 (15:22 +0000)]
Support argument to {clear-and-,}redraw-all (#45994)

This commit makes clear-and-redraw-all similar to bash's clear-screen,
which some users may find useful.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4240 048f04df-13f5-43d7-8114-9f9ceecaec24

14 months agoUp version to 2.54
magicant [Sat, 25 Feb 2023 03:06:14 +0000 (03:06 +0000)]
Up version to 2.54

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4235 048f04df-13f5-43d7-8114-9f9ceecaec24

14 months agoTest alias substitution to empty string
magicant [Fri, 24 Feb 2023 15:06:29 +0000 (15:06 +0000)]
Test alias substitution to empty string

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4234 048f04df-13f5-43d7-8114-9f9ceecaec24

14 months agoAlias ending with blank & line continuation (#46532)
magicant [Fri, 24 Feb 2023 15:06:26 +0000 (15:06 +0000)]
Alias ending with blank & line continuation (#46532)

If the value of an alias substitution ends with a blank, the shell
checks the next token for another substitution. Previously, yash was
examining the parse buffer content to see if the last character of the
alias value was blank. However, this procedure incorrectly ignored any
line continuation that might be at the end of the value. After this
commit, the shell will test the last character in the alias definition
to determine the character blankness correctly.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4233 048f04df-13f5-43d7-8114-9f9ceecaec24

15 months agoDon't declare undefined function
magicant [Thu, 2 Feb 2023 15:15:48 +0000 (15:15 +0000)]
Don't declare undefined function

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4232 048f04df-13f5-43d7-8114-9f9ceecaec24

15 months agoCorrect documentation
magicant [Fri, 27 Jan 2023 15:08:49 +0000 (15:08 +0000)]
Correct documentation

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4231 048f04df-13f5-43d7-8114-9f9ceecaec24

15 months agoCorrect documentation
magicant [Fri, 27 Jan 2023 14:14:42 +0000 (14:14 +0000)]
Correct documentation

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4230 048f04df-13f5-43d7-8114-9f9ceecaec24

15 months agocommon: alias o for WSL
magicant [Sat, 21 Jan 2023 03:29:31 +0000 (03:29 +0000)]
common: alias o for WSL

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4229 048f04df-13f5-43d7-8114-9f9ceecaec24

15 months agoSort shell options
magicant [Wed, 18 Jan 2023 15:51:32 +0000 (15:51 +0000)]
Sort shell options

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4228 048f04df-13f5-43d7-8114-9f9ceecaec24

15 months agoUpdate docs for le-trim-right option
magicant [Wed, 18 Jan 2023 15:51:29 +0000 (15:51 +0000)]
Update docs for le-trim-right option

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4227 048f04df-13f5-43d7-8114-9f9ceecaec24

15 months agoAdd le-trim-right option
magicant [Tue, 10 Jan 2023 13:53:15 +0000 (13:53 +0000)]
Add le-trim-right option

Patch contributed by leath-dub at:
https://github.com/magicant/yash/pull/13

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4226 048f04df-13f5-43d7-8114-9f9ceecaec24

15 months agoImprove syntax error message (#46475)
magicant [Sat, 7 Jan 2023 14:39:43 +0000 (14:39 +0000)]
Improve syntax error message (#46475)

This commit modifies the error message printed when the shell sees a
redundant token following a valid command. If the token is closing, the
print_errmsg_token_unexpected function renders a better note.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4225 048f04df-13f5-43d7-8114-9f9ceecaec24

16 months agoDocument prediction font styling
magicant [Sat, 24 Dec 2022 06:44:32 +0000 (06:44 +0000)]
Document prediction font styling

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4224 048f04df-13f5-43d7-8114-9f9ceecaec24

16 months agoDon't negate exit status of return (#46224)
magicant [Fri, 9 Dec 2022 14:44:04 +0000 (14:44 +0000)]
Don't negate exit status of return (#46224)

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4223 048f04df-13f5-43d7-8114-9f9ceecaec24

17 months agoDisallow recursive xtrace (#46095)
magicant [Wed, 23 Nov 2022 05:20:47 +0000 (05:20 +0000)]
Disallow recursive xtrace (#46095)

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4222 048f04df-13f5-43d7-8114-9f9ceecaec24

17 months agoRemove outdated references to removed functions
magicant [Wed, 23 Nov 2022 04:27:46 +0000 (04:27 +0000)]
Remove outdated references to removed functions

The `save_parse_state' has been removed since long ago.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4221 048f04df-13f5-43d7-8114-9f9ceecaec24

17 months agoUpdate exported $DIRSTACK value in pushd/popd
magicant [Tue, 15 Nov 2022 16:15:07 +0000 (16:15 +0000)]
Update exported $DIRSTACK value in pushd/popd

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4220 048f04df-13f5-43d7-8114-9f9ceecaec24

17 months agoEnsure allexport applied to all assignments (#46011)
magicant [Tue, 15 Nov 2022 16:15:04 +0000 (16:15 +0000)]
Ensure allexport applied to all assignments (#46011)

Previously, there were many call sites of `set_variable' and `set_array'
that failed to pass `shopt_allexport'. This commit modifies the two
functions so that they applies the option themselves.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4219 048f04df-13f5-43d7-8114-9f9ceecaec24

17 months agoApply errexit & errreturn to for loop assignment error (#46052)
magicant [Sun, 13 Nov 2022 15:49:03 +0000 (15:49 +0000)]
Apply errexit & errreturn to for loop assignment error (#46052)

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4218 048f04df-13f5-43d7-8114-9f9ceecaec24

17 months agoEnsure noclobber redirection terminate (#46053)
magicant [Thu, 10 Nov 2022 14:33:49 +0000 (14:33 +0000)]
Ensure noclobber redirection terminate (#46053)

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4217 048f04df-13f5-43d7-8114-9f9ceecaec24

18 months agoRemove unnecessary apply_errexit_errreturn call
magicant [Thu, 3 Nov 2022 05:57:08 +0000 (05:57 +0000)]
Remove unnecessary apply_errexit_errreturn call

This call was added in r3628 to handle redirection errors in compound
commands. Since r4130 split the function so simple and compound commands
are handled in separate functions, the call is not needed now.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4216 048f04df-13f5-43d7-8114-9f9ceecaec24

18 months agoAllow configuring predict style through the PS*P variable
magicant [Mon, 10 Oct 2022 15:12:51 +0000 (15:12 +0000)]
Allow configuring predict style through the PS*P variable

Patch contributed by Thomas Vigouroux <thomas.vigouroux@protonmail.com>

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4215 048f04df-13f5-43d7-8114-9f9ceecaec24

18 months agoRun tests about comments as POSIX sh
magicant [Thu, 6 Oct 2022 15:55:49 +0000 (15:55 +0000)]
Run tests about comments as POSIX sh

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4214 048f04df-13f5-43d7-8114-9f9ceecaec24

19 months agoSkip unstable tests about stopping signals (#45760)
magicant [Wed, 5 Oct 2022 16:03:28 +0000 (16:03 +0000)]
Skip unstable tests about stopping signals (#45760)

There are more parameter combinations we have missed to skip.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4213 048f04df-13f5-43d7-8114-9f9ceecaec24

19 months agoPrevent some tests from being suspended (#45760)
magicant [Wed, 5 Oct 2022 16:03:25 +0000 (16:03 +0000)]
Prevent some tests from being suspended (#45760)

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4212 048f04df-13f5-43d7-8114-9f9ceecaec24

19 months ago.github/workflows/c: Use latest actions/checkout
magicant [Sat, 1 Oct 2022 13:48:14 +0000 (13:48 +0000)]
.github/workflows/c: Use latest actions/checkout

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4211 048f04df-13f5-43d7-8114-9f9ceecaec24

19 months ago.github/workflows/c: Use stable apt command line
magicant [Sat, 1 Oct 2022 13:48:12 +0000 (13:48 +0000)]
.github/workflows/c: Use stable apt command line

The "apt" utility is for interactive uses and its command line syntax is
subject to change. We should use "apt-get" for scripting purposes.

Also, we should update the cache before installation since the stale
cache may prevent apt from fetching the correct package.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4210 048f04df-13f5-43d7-8114-9f9ceecaec24

19 months agoconfigure: add -std=c99 conditionally (#45739)
magicant [Sat, 1 Oct 2022 12:31:43 +0000 (12:31 +0000)]
configure: add -std=c99 conditionally (#45739)

Many users seem to try to override the default CC and/or CFLAGS without
knowing the effect of what they are doing. Our build configuration needs
a confirming C99 compiler, which may require a specific option to select
the language version. This commit adds a dynamic test that makes sure
the compiler is invoked with appropriate options.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4209 048f04df-13f5-43d7-8114-9f9ceecaec24

19 months agoRequire $PATH search for substitutive built-ins
magicant [Wed, 28 Sep 2022 13:40:36 +0000 (13:40 +0000)]
Require $PATH search for substitutive built-ins

This commit recategorizes regular built-ins into substitutive built-ins
and extension built-ins in order to remove the use of the words "regular
built-ins," which have been used in a different meaning than mentioned
in POSIX.

To minimize the behavioral differences caused by enabling the POSIXly-
correct mode, substitutive built-ins now require a corresponding
external program when running them except for the "array" built-in which
now is an extension built-in and is completely ignored in the POSIXly-
correct mode.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4208 048f04df-13f5-43d7-8114-9f9ceecaec24

19 months agoReject non-portable built-ins in POSIX mode (#43467)
magicant [Wed, 28 Sep 2022 13:40:33 +0000 (13:40 +0000)]
Reject non-portable built-ins in POSIX mode (#43467)

To be more restrictive on non-portable features in the POSIX mode, yash
now refuses to execute built-ins listed as utilities with unspecified
results in POSIX XCU 2.9.1. The built-in category "semi-special" is
removed in favor of the new categories "mandatory" and "elective."

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4207 048f04df-13f5-43d7-8114-9f9ceecaec24

20 months agodoc/ja: Fix translation of meta-variables
magicant [Sat, 3 Sep 2022 03:26:25 +0000 (03:26 +0000)]
doc/ja: Fix translation of meta-variables

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4206 048f04df-13f5-43d7-8114-9f9ceecaec24

20 months agodoc/ja: Remove reference to incorrect option
magicant [Sat, 3 Sep 2022 03:13:32 +0000 (03:13 +0000)]
doc/ja: Remove reference to incorrect option

The break and continue built-ins do not have the interact option.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4205 048f04df-13f5-43d7-8114-9f9ceecaec24

20 months agodoc/ja/intro: Fix markup
magicant [Sat, 3 Sep 2022 02:57:11 +0000 (02:57 +0000)]
doc/ja/intro: Fix markup

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4204 048f04df-13f5-43d7-8114-9f9ceecaec24

20 months agoUp version to 2.53
magicant [Tue, 23 Aug 2022 13:52:32 +0000 (13:52 +0000)]
Up version to 2.53

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4202 048f04df-13f5-43d7-8114-9f9ceecaec24

20 months agoconfigure: Avoid compiler warnings in getrlimit test
magicant [Sat, 20 Aug 2022 06:17:01 +0000 (06:17 +0000)]
configure: Avoid compiler warnings in getrlimit test

GCC 12 yields a warning when getrlimit from glibc 2.35 is called with a
second parameter being null. We should suppress the warning so the test
succeeds when compiled with the -Werror option.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@4201 048f04df-13f5-43d7-8114-9f9ceecaec24