1 | Shell Options
|
2 |
|
3 | [Option Groups] strict:all ysh:upgrade ysh:all
|
4 | [Strictness] ... More Runtime Errors
|
5 | strict_argv No empty argv
|
6 | strict_arith Fatal parse errors (on by default)
|
7 | strict_array Arrays and strings aren't confused
|
8 | strict_control_flow Disallow misplaced keyword, empty arg
|
9 | strict_errexit Disallow code that ignores failure
|
10 | strict_nameref trap invalid variable names
|
11 | strict_word_eval Expose unicode and slicing errors
|
12 | strict_tilde Tilde subst can result in error
|
13 | X strict_glob Parse the sublanguage more strictly
|
14 | [YSH Upgrade] ... Migrate Existing Code to YSH
|
15 | parse_at echo @array @[arrayfunc(x, y)]
|
16 | parse_brace if true { ... }; cd ~/src { ... }
|
17 | parse_equals x = 'val' in Caps { } config blocks
|
18 | parse_paren if (x > 0) ...
|
19 | parse_proc proc p { ... }
|
20 | parse_triple_quote """$x""" '''x''' (command mode)
|
21 | parse_ysh_string echo r'\' u'\\' b'\\' (command mode)
|
22 | command_sub_errexit Synchronous errexit check
|
23 | process_sub_fail Analogous to pipefail for process subs
|
24 | sigpipe_status_ok status 141 -> 0 in pipelines
|
25 | simple_word_eval No splitting, static globbing
|
26 | xtrace_rich Hierarchical and process tracing
|
27 | xtrace_details (-u) Disable most tracing with +
|
28 | dashglob (-u) Disabled to avoid files like -rf
|
29 | redefine_proc (-u) Can procs be redefined?
|
30 | [Interactive] redefine_module 'module' builtin always returns 0
|
31 | X redefine_const Can consts be redefined?
|
32 | [Simplicity] ... More Consistent Style
|
33 | simple_echo echo doesn't accept flags -e -n
|
34 | simple_eval_builtin eval takes exactly 1 argument
|
35 | simple_test_builtin 3 args or fewer; use test not [
|
36 | X simple_trap Function name only
|
37 | [YSH Breaking] ... The Full YSH Language
|
38 | parse_at_all @ starting any word is an operator
|
39 | parse_backslash (-u) Allow bad backslashes in "" and $''
|
40 | parse_backticks (-u) Allow legacy syntax `echo hi`
|
41 | parse_bare_word (-u) 'case unquoted' and 'for x in unquoted'
|
42 | parse_dollar (-u) Allow bare $ to mean \$ (maybe $/d+/)
|
43 | parse_dbracket (-u) Is legacy [[ allowed?
|
44 | parse_dparen (-u) Is (( legacy arithmetic allowed?
|
45 | parse_ignored (-u) Parse, but ignore, certain redirects
|
46 | parse_sh_arith (-u) Allow legacy shell arithmetic
|
47 | expand_aliases (-u) Whether aliases are expanded
|
48 | X copy_env (-u) Use $[ENV.PYTHONPATH] when false
|
49 | X old_builtins (-u) local/declare/etc. pushd/popd/dirs
|
50 | ... source unset printf [un]alias
|
51 | ... getopts
|
52 | X old_syntax (-u) [[ $(( )) ( ) ${x%prefix}
|
53 | ${a[@]} $$
|
54 | [Compatibility] eval_unsafe_arith Allow dynamically parsed a[$(echo 42)]
|
55 | verbose_errexit Whether to print detailed errors
|
56 | [More Options] _allow_command_sub To implement strict_errexit, eval_unsafe_arith
|
57 | _allow_process_sub To implement strict_errexit
|
58 | dynamic_scope To implement 'proc'
|
59 | _no_debug_trap Used in pipelines in job control shell
|