• R/O
  • SSH
  • HTTPS

yash: Commit


Commit MetaInfo

Revision3205 (tree)
Time2013-02-17 17:14:28
Authormagicant

Log Message

yash: expand: maybe_exit_on_error (#30663)
初期化ファイル実行中は展開エラーでシェルを終了しないように

Change Summary

Incremental Difference

--- yash/trunk/doc/ja/exec.txt (revision 3204)
+++ yash/trunk/doc/ja/exec.txt (revision 3205)
@@ -66,7 +66,7 @@
6666 - 文法エラーのためコマンドを解釈できないとき (link:invoke.html#init[シェルの初期化]中を除く)
6767 - link:posix.html[POSIX 準拠モード]で、link:builtin.html#types[特殊組込みコマンド]のオプションやオペランドの使い方が間違っているとき
6868 - POSIX 準拠モードで、特殊組込みコマンドに対してリダイレクトエラーまたは代入エラーが発生したとき
69-- 展開エラーが発生したとき
69+- 展開エラーが発生したとき (シェルの初期化中を除く)
7070
7171 [NOTE]
7272 Yash はそうではありませんが、<<search,コマンドの検索>>において実行すべきコマンドが見つからなかったときに直ちに終了するようなシェルもあります。
--- yash/trunk/doc/exec.txt (revision 3204)
+++ yash/trunk/doc/exec.txt (revision 3205)
@@ -161,7 +161,8 @@
161161 - An error occurs during redirection or assignment in a
162162 link:syntax.html#simple[simple command] whose command name is a special
163163 built-in and the shell is in the POSIXly-correct mode.
164-- An error occurs during link:expand.html[expansion].
164+- An error occurs during link:expand.html[expansion] (except during shell
165+ initialization).
165166
166167 [NOTE]
167168 Some shells other than yash exit when they fail to find a command to execute
--- yash/trunk/NEWS (revision 3204)
+++ yash/trunk/NEWS (revision 3205)
@@ -13,8 +13,9 @@
1313 + New "test" built-in operator: =~, -o (unary)
1414 + New completion scripts for:
1515 configure, git-name-rev, git-request-pull, make, rsync
16- = A syntax error in .yash_profile or .yashrc no longer makes the
17- shell exit even when the shell is not interactive.
16+ = A syntax error or expansion error in .yash_profile or .yashrc
17+ no longer makes the shell exit even when the shell is not
18+ interactive.
1819 = In line-editing, overwritten characters are now restored when you
1920 hit the backspace key.
2021 = In line-editing, the undo history is no longer saved for each
--- yash/trunk/expand.c (revision 3204)
+++ yash/trunk/expand.c (revision 3205)
@@ -1789,7 +1789,7 @@
17891789 * The shell exits if it is non-interactive. */
17901790 void maybe_exit_on_error(void)
17911791 {
1792- if (!is_interactive_now)
1792+ if (shell_initialized && !is_interactive_now)
17931793 exit_shell_with_status(Exit_EXPERROR);
17941794 }
17951795
Show on old repository browser