- add
Array#searchSorted
,Array#searchSortedBy
methods - expose internal three-way comparison api used by
Array#sort
method- add
Int#compare
,Bool#compare
,Signal#compare
,String#compare
methods likeFloat#compare
- add
- support
$/cancelRequest
for request cancellation
else
pattern in case expression is no longer needed ifVoid
type expression
- Breaking Change: change comparator interface of
Array#sortBy
method. now use three-way comparison - Breaking Change: change parameter name of some builtin methods
String#slice
,Array#slice
,Job#kill
,Array#addAll
,Array#removeRange
,LineEditor#readLine
- Breaking Change: rename
Map#addAll
method withMap#putAll
- automatically insert
(
,()
after completing method names - various
LineEditor
improvements- fix screen corruption when shrink window cols
- hide description/signature of completion pager if columns size is smaller than item size
- undo completion candidate insertion via
ESC
key
- improve indexing of named argument
- support generic method's named argument
- support implicit constructor's named argument
- support backward reference
- overhaul analyzer worker
- now correctly debounce rebuild
- change some methods to non-blocking
textDocument/didClose
correctly remove unused sources
- improve
textDocument/documentSymbol
- support children and local variables
- support detail
- bugfix ExtendedPictographic handling of Unicode word segmentation
- check field and method name conflict in
textDocument/rename
- simplify license file
- fix package asset
- fix initial seed of internal random number generator
- overhaul exception handling
- add
AssertionFailed
,ShellExit
type- unlike
Error
type, not catch these type objects
- unlike
- add
Throwable
type for common base type ofError
,AssertionFailed
andShellExit
- now only throw
Throwable
type or its derived instance - not allow instantiation of
Throwable
type
- now only throw
- add builtin
THROWN
variable for indicating currently thrown object
- add
- now get underlying job object of process substitution
- add
ProcSubst
type for indicating process substitution (ProcSubst
is derived type ofFD
) - get underlying job object via
ProcSubst#job
method
- add
- support error highlight of line editor
- highlight not-found command or not-found file path
- specify error color by
error
token class
- support OSC133 (shell integration/semantic prompt)
- enable via
semantic-prompt
config
- enable via
- add
String#validate
method for utf8 validation - add
String#foldCase
method for Unicode-aware case folding - re-enable builtin
eval
command. evaluate string within implicit function scope - add
Jobs
type and related method for inspecting job tableJobs#get
,Jobs#[]
: lookupJob
object by job-specJobs#count
: count available jobs
- add
--sample
option toarcolorize
. now use embedded sample code as input
- Breaking Change: overhaul
TERM_HOOK
invocation- change
TERM_HOOK
interface, now do not pass extra information (exit status, termination kind) - also remove
ON_ASSERT
,ON_ERR
,ON_EXIT
constants - now allow signal handler invocation
- change
- Breaking Change: now not ignore exceptions from finally/defer block even if currently thrown
- maintain these exceptions and get theme via
Throwable#suppressed
method
- maintain these exceptions and get theme via
- Breaking Change: output redirection to existing non-regular file is no longer error if
clobber
option is unset- like bash/zsh
- send
SIGHUP
to manged jobs before process termination (even if subshell)
- Breaking Change:
String#sanitize
method no longer replace null characters - Breaking Change: rename
Array#sortWith
method withArray#sortBy
- now interrupt
LineEditor#readLine
method when receive signals- also call signal handler
- natively complete builtin
shctl
command sub-commands/options. now no longer need completion script - improve job-spec parsing
- support
%%
,%+
,%-
format - drop support
N
format due to posix compatibility
- support
- improve backslash escape handling of builtin complete command. now correctly escape completion candidates
- Breaking Change: change command/command-argument completion option handling
- remove
arshd.commandCompletion
,arshd.commandArgumentCompletion
options - now always enable command/command-argument completions except for filename (also external command)
- add
arshd.fileNameCompletion
option for control filename completion
- remove
- Breaking Change: in
atexit.arsh
module, change interface ofatexit
function corresponding toTERM_HOOK
- in
repl.arsh
module, setSIG_EXIT
handler toSIGHUP
for logout - change termination handler invocation order of
atexit
function. now reverse order of registration
- fix executable file checking in filename completion
- fix ignored exception handling when throw from finally
- fix code generation of for-in expression
- bugfix quotation of command name completion candidates having description
- bugfix power assert
is
when expr is invalid value - fix unexpectedly appeared garbage lines in KDE
yakuake
terminal- now correctly clear lines by using
\x1b[0J
sequence
- now correctly clear lines by using
Command
type support==
,!=
operators like function- add
type
keyword. now define type by usingtype
keyword instead oftypedef
typedef
keyword is still used for type definition
- add
const
keyword for future usage - support real-time signal
- get real-time signal value by
RTMIN+N
,RTMAX-N
- builtin kill command can list and send real-time signals
Signal#trap
support real-time signals (but do not guarantee delivery priority)
- get real-time signal value by
- add
LINES
,COLUMNS
builtin variables for indicating terminal window size- manually update theme via
shctl winsize
sub-command - also updated via
LineEditor#readLine
method - when receive
SIGWINCH
, automatically updated
- manually update theme via
- in
LineEditor#readLine
, scroll lines when input rows is larger than window rows - add
String#ifEmpty
method
- add
--custom-style
option to colorize- now can modify existing color styles
- adjust
command_arg
color of some color styles
- Breaking Change: remove
:-
,:=
operators due to potential syntax ambiguity (: -
)- use
String#ifEmpty
instead
- use
- Breaking Change: always need space
${
and command literal due to potential syntax ambiguity - re-enable source glob cancellation for potential too slow filesystem
- automatically clear file path cache after
PATH
modification like bash/zsh - remove file path cache entry if command execution failed regardless of errno
- also remove entry if builtin exec command failed
- support Unicode 16.0
- change string representation of Float value. now generate correctly rounded, shortest length
string
- now satisfy the following assertion
var d = 0.1+0.2 assert "$d".toFloat()! == $d
- now satisfy the following assertion
- add
help
attribute param toArg
attribute. now specify detail message of positional argument - change string representation of function/command. now generate uniq name (include module id)
- fix assertion error message of function/command equality check (
==
) - improve assertion error message of
is
expression. now show expr type and target type
- Breaking Change: in
LineEditor
, disable software flow control by default like fish - Breaking Change: do not ignore
SIGWINCH
- Breaking Change: remove
CLI#parseOrExit
method due to unused - Breaking Change: overhaul builtin read command
- fix help message
- not perform field splitting (not remove surrounding spaces) when store to
REPLY
- support
-d
option for specifying input delimiter - fix backslash escape handling. now skip newline
- support
-n
,-N
options like bash
- Breaking Change: raise
SystemError
when callJob#kill
method to terminated/uncontrolled job - improve error checking of builtin
kill
command when send signal to uncontrolled job - add
once
param toString#replace
andRegex#replace
methods- now only replace first occurrence of pattern
- add
start
,end
method toRegexMatch
type. now get offsets of match string - improve error message of builtin
shctl
command. now show subcommand name - improve resize handling of
LineEditor#readLine
method- automatically refresh line when receive
SIGWINCH
- hide completion pager if row size is too small
- automatically refresh line when receive
- improve
textDocument/semanticTokens
- add
commandArgument
semantic token type for better semantic highlight of command argument
- add
- support named arguments
- support
textDocument/definition
,textDocument/references
,textDocument/hover
,textDpcument/rename
- support
- after call
ARState_readLine
, always clearO_NONBLOCK
flag of stdin
- Breaking Change: change
-i
option behavior like bash- always run interactive mode (rcfile load, job control, is-interactive), but execute specified input
- now
-i -c <string>
execute<string>
with rcfile loading-ci <string>
notation is not supported since-c
option recognizei
as an argument
- after rcfile loading, continue read-and-eval even if error (also exit, assertion failure)
- Breaking Change: rename
dscolorize
witharcolorize
dscolorize
is installed as symlink
- bugfix
LineEditor#action
method when remove custom action- now correctly remove key-bindings that bound to removed custom action
- fix named argument of named imported function
- broken newline handling of prefix env assignment parsing
- declarative command line argument parsers now support sub-commands
- define sub-commands via
SubCmd
attribute
- define sub-commands via
- add shift operators such as
<<
,>>
,>>>
- equivalent to java shift operators
- unlike other arithmetic operators, not check overflow
- add
SUBSHELL
variable for indicating subshell level- initial value is 0. if enter subshell, increment level
- add
SIGWINCH
signal constant
- Breaking Change: in process substitution, internal job object no longer maintain created
FD
object - Breaking Change: change last-pipe semantics
- correctly check pipeline exit status and throw
ExecError
whenerrraise
option is enabled break
,continue
,return
expressions are no longer allowed in pipeline
- correctly check pipeline exit status and throw
- Breaking Change:
default
param ofOption
attribute now accept null characters - improve assertion error message of binary
==
and=~
expression- now show left hand-side, right hand-side expression value
- improve internal error checking of
dup2
,pipe
system call, now propagate these errors asSystemError
- correctly report method lookup error of module private method
- Breaking Change: rename some
Job
type methods with corresponding builtin commandsdetach
->disown
raise
->kill
- Breaking Change: no longer update
PPID
in subshell for posix compatibility.- now
PPID
always indicates same value
- now
- Breaking Change: builtin
exec
command now throwSystemError
if command execution failed- now do not exit shell itself
- Breaking Change: not allow recursive
LineEditor#readLine
method call even if other instance- due to prevent potential stack overflow
- now throw
InvalidOperationError
complete
command correctly recognize module (putmodule
description instead ofuser-defined
)- complete flags/options/sub-commands defined via
Flag
,Option
,SubCmd
attribute - builtin
kill
command support-L
(equivalent to-l
option) - after call builtin
exec
, decrementSHLVL
- if
SHLVL
is unset or invalid number, reset to 0
- if
- improve
textDocument/rename
- now enabled by default
- support field rename
- now check method override
- ask for confirmation when rename public symbol to private
- Breaking Change: add
.arsh
file extension to std modules- add symlink
repl
,completion
,prompt
for compatibility
- add symlink
- fix resource leak of file descriptor (self-pipe) when fork failed
- fix error message of invalid option in cli parser
- fix
\"
escape handling in here document (unlike double-quoted string, not remove backslash)
- bugfix code generation of catch block with nested blocks (fix potential resource leak)
- correctly set
PIPESTATUS
when throw error from last-pipe - preserve
REPLY
,reply
,PIPESTATUS
duringLineEditor
callback
- now can use local installed
re2c
(require v2.0.0 or later) - can disable CTest build
- install
litecheck
to$DATA_DIR/tools
by default
- fix release GitHub action
- support named arguments like the following
"23345".toInt($radix: 10)
- also suggest/complete possible parameters
- add
Candidates
type for completion candidate pagersize
: get size of candidates[]
: get candidatehasSpace
: check if candidate need spaceadd
: add new candidate- also specify additional description via
desc
parameter - specify space insertion behavior after candidate insertion via
space
parameter- if
space
is 0, not insert space - if
space
is 1 or more, force insert space - otherwise, automatically insert space if needed
- if
- also specify additional description via
addAll
: add candidates from other
- improve completion candidates pager in
LineEditor
- show description of candidate like fish
- also show type signature style description
- insert space after candidate even if candidate rotation
- add
EAW
variable for indicating current east asian ambiguous character width (1 or 2)- initial value is 1
- updated via
LineEditor#readLine
method- if
LineEditor#config('eaw', 0)
, set auto-detected width - otherwise, set specified width of
LineEditor#config
- if
- add
bind
command and module- now set and display key-bind setting of
LINE_EDIT
- now set and display key-bind setting of
- Breaking Change: various glob expansion improvements
- now
?
meta character is unicode-aware - support bracket expression (such as
[^a-zA-Z-]
)- now
[]
is recognized as glob bracket expression- single
[
and]
are not recognized as bracket expression
- single
- also support character class such as
alnum
,space
- now
- always perform tilde expansion before glob expansion
- if
failglob
is disabled and glob expansion failed, return tilde expanded string
- if
- now suppress runtime error when having null characters via
nullglob
on orfailglob
off - support recursive glob (a.k.a.
globstar
)- enabled via
globstar
runtime option (enabled by default)
- enabled via
- now propagate
opendir
error, such asEMFILE
,ENFILE
,ENOMEM
- check glob recursion depth
- now
- Breaking Change: overhaul tilde expansion
- now correctly expand
anything=~
style tilde expansion combined with brace expansion - now
=~
style expansion is runtime error (throwTildeError
)
- now correctly expand
- Breaking Change: now not preserve exit status during finally/defer block
- now the following code is valid
let old = $? defer { $? = $old; }
- now the following code is valid
- Breaking Change: not reset exit status before call user-defined command due to posix shell compatibility
- Breaking Change: not allow
/
character in user-defined command name - Breaking Change: change cli error message. now print command name
- Breaking Change: now max input size is 1GB
- auto-unwrap option type expression in for-in expression
for a in "123" as String? { echo $a; }
- pass fully qualified command name to
COMP_HOOK
for user-defined command - improve declarative command line argument parsing
- add
desc
parameter toCLI
attribute- now put command line description message
- add
xor
parameter toFlag
,Option
attribute. now define exclusive options
- add
- allow
if-var
optional binding likeif-let
- support additional redirection op
<>
: open file descriptor with read-write mode<& -
,>& -
: close file descriptor
- truncate large error message of internal error (up to 65535 byte)
- rename
GlobbingError
withGlobError
(GlobbingError
is defined as type-alias for compatibility) - rename
UnwrappingError
withUnwrapError
(UnwrappingError
is defined as type-alias for compatibility)
- Breaking Change: change type signature of
COMPREPLY
and related method- change
COMPREPLY
type withCandidates
- change
COMP_HOOK
type with((Module, [String], Int) -> Candidates?)?
- change
LineEditor#setCompletion
parameter with((Module, String) -> Candidates)?
- change
- Breaking Change: change builtin
complete
command-s
option behavior- not insert suffix space to candidates (but print space)
- print space even if multiple candidates
- Breaking Change: builtin
exec
command-a
option now does not allow null characters - Breaking Change: newly created
FD
objects always have close-on-exec flag due to prevent fd leak- except for
STDIN
,STDOUT
,STDERR
FD#dup
method always set close-on-exec flag- when change close-on-exec flag, call
FD#cloexec
method
- except for
Error
type constructor now accept 0 status- builtin
complete
command put completion candidate description via-d
option- put type-signature of variable/field/function/method
- put command type (user-defined, builtin, dynamic, external) in command name completion
- improve various
LineEditor
methods- change
bind
method signature, now accept optional argument- if specified
None
, remove existing key-bind
- if specified
- now remove already defined custom action when pass
None
toaction
method
- change
- hide cursor during line refresh due to suppress potential cursor flicker
- improve
xtrace
option behavior- now specify trace output via
XTRACEFD
variable - truncate too large command line
- now specify trace output via
- improve internal error checking of
FD
iteration- now report io error
- correctly check read string size limit
Module#_func
method can accept up to 1GB input string
- replace manual command line argument parsing of the following user-defined command
prompt
command inprompt
modulehistory
command inhistory
modulecompdef
command incompletion
module
- improve completion module
- supports bash-completion v2.12
- load compat script for old api
- not insert space after
--long=
option - fix
--long=
style long option completion
- supports bash-completion v2.12
- in
fzf
module, setRUNEWIDTH_EASTASIAN
environmental variable for supporting fzf 0.46.0 or later
- fix
EIO
handling in interactive mode- retry
ARState_readLine
whenEIO
happened - when call
ARState_readLine
, always be foreground process
- retry
- fix
Module#_fullname
method when pass valid fully qualified command name - fix expansion error check
- add missing string size checking to
CLI#usage
method - fix SEGV when pass too long arguments to external command
- fix error checking of
FD
constructor - accidentally close file descriptor when throw error before redirection
- fix error checking of FD passing
- fix help message of
prompt
command inprompt
module - fix return value of
String#lastIndexOf
when specified empty string- now return haystack size
- fix lineno of command argument
- add
failglob
runtime option- enable/disable glob expansion error check
- if disabled, not throw
GlobbingError
even if glob expansion failed failglob
option is enabled by default- if both
nullglob
andfailglob
are enabled,nullglob
has priority
- if disabled, not throw
- enable/disable glob expansion error check
- add
failtilde
runtime option- enable/disable tilde expansion error check
- if disabled, not throw
TildeError
even if tilde expansion failed
- if disabled, not throw
failtilde
option is enabled by default
- enable/disable tilde expansion error check
LineEditor
support undo/redo op- ctrl-z: undo
- atl-/: redo
- add
ARG0
,ARGS
variables- indicate toplevel
0
and@
- indicate toplevel
- add some internal configuration methods to
LineEditor
config
: set internal line editor configuration- enable/disable software flow control, bracketed paste mode
- change kill-ring size
- set syntax highlight color (only accept valid SGR sequence)
- set east asian width
- enable/disable language specific feature (syntax highlight, auto line-continuation)
configs
: get internal configurations
- add
PRE_PROMPTS
for pre-prompt hook - add
\l
,\D
,\A
specifiers to prompt renderer
- support the following request
workspace/configuration
client/registerCapability
client/unregisterCapability
- Breaking Change: rename project name with
arsh
- rename binary (
ydsh
,ydshd
) witharsh
,arshd
- rename binary (
- Breaking Change: remove
name
parameter fromCLI
attribute - Breaking Change: need spaces between
${
and number- due to suppress potential syntax ambiguity
- now
${345 }
,${3.14}
notations are syntax error
- Breaking Change: change to-string of collection having invalid value
- now emit
(invalid)
instead of throwingUnwrappingError
- now emit
- Breaking Change: not overwrite the following environmental variables at startup time for
compatibility with other
shells
HOME
,LOGNAME
,USER
- some command manually set theme and affect own child process behavior (ex. sudo)
- add
toplevel
parameter toCLI
attribute - in io redirection, allow file descriptor number greater than 4 (up to 9)
- now support like the following bash idiom
do-something 3>&1 1>&2 2>&3 # swap stdout and stderr exec 9>lockfile && flock -n 9 # flock with file descriptor number
- Breaking Change: rename some builtin variables
YDSH_BIN
toBIN_NAME
YDSH_VERSION
toVERSION
- Breaking Change: check iterator invalidation of Array object
- also check
DIRSTACK
in builtinpushd
,popd
,dirs
commands - check object modification in
sortWith
method - check object modification in
LineEditor#readLine
method
- also check
- Breaking Change: assign new object to the following builtin variables at internal modification
reply
,PIPESTATUS
- Breaking Change:
FD#dup
method inheritCLOEXEC
flag from original file descriptor - Breaking Change: change default value of
CLI#name
method- if
toplevel
attribute param is specified, return toplevelARG0
- otherwise, return current
0
(normally current user-defined command name)
- if
- Breaking Change: remove
LineEditor#setColor
method. useLineEditor#config
instead - Breaking Change: change error message of builtin commands
- now show current source name and line number
- Breaking Change: change return value of
Regex#match
method- now return
RegexMatch?
type value RegexMatch
type provide the following methodscount
: get group countgroup
: get group by indexnamed
: get group by namenames
: get names of named group
- now return
LineEditor#readLine
method correctly report out-of-memory errorshctl info
sub-command show Unicode version- check io error in builtin
command
- builtin
test
command support more than 3 arguments- also support
!
,( )
,-o
,-a
expressions
- also support
- Breaking Change: rename public api
- replace prefix
DS
withAR
- replace prefix
ARState_setArguments
api always assign new object- add
AR_CONFIG_UNICODE
constant toARState_config
for unicode version detection
- improve indexing
- index builtin type or type template
- improve
textDocument/rename
- overhaul scope-aware name conflict checking
textDocument/didClose
always synchronizes analyzer state before actual close operationtextDocument/semanticTokens
supports dynamic registrationtextDocument/publishDiagnostics
emits undefined sub-command warning
- not truncate
Error#show
message having null characters - not allow file descriptor number before
&>
,&>|
,&>>
redirections - fix typo of builtin
command
message - fix
errraise
option handling in builtincommand
,exec
- fix
-g
unary op behavior of builtin test command - glob expansion does not match pattern having empty string fragments
- support declarative command line argument parsing
- now introduce attributes that specify command line option setting
CLI
attribute: for defining command line data structure (derived type ofCLI
type)Flag
attribute: for no-argument (flag) optionOption
attribute: for option that take an argumentArg
attribute: for positional argument
- automatically parse command line argument in the following form
[<CLI>] typedef Param() { [<Flag>] var debug = $false } ff(p : Param) { echo $p }
- user-defined command parameter
p
holds parsed result of command line arguments
- user-defined command parameter
- now introduce attributes that specify command line option setting
- add
SIG_EXIT
function for graceful shutdown via receiving signal - add
[Signal]#trap
method for set signal handler of multiple signals at once - add builtin
getenv
command- get environmental variable and store to
REPLY
- get environmental variable and store to
- add
valid_env
action to builtincomplete
command- complete only valid env names
- add
CLI
type and related methodsname
: get command name ofCLI
instancesetName
: set command nameparse
: parse command line argument and store result. if reach parse error, raiseCLIError
parseOrExit
: parse command line argument and store result. if reach parse error, exit shellusage
: get usage message
- add
ArgumentError
for unacceptable argument - add
String#basename
,String#dirname
methods
- support the following requests
textDocument/signatureHelp
- show (direct/indirect)function/method/constructor type signatures
textDocument/rename
(experimental support, disabled by default)textDocument/prepareRename
- Breaking Change: change disowned background job semantics
- now do not redirect stdin to /dev/null if job control is enabled
- Breaking Change: restrict the number of traversed directories in glob expansion of source
statement
- glob cancellation is no longer needed
- Breaking Change: change module directory structure
MODULE_HOME
indicatesXDG_DATA_HOME/modules
MODULE_DIR
indicatesDATA_DIR/modules
- completion script directory indicates
DATA_DIR/completions
- Breaking Change: not allow override of generic base type in global scope
- Breaking Change: when call fullname command,
$0
indicate actual command name (not contain null characters) - Breaking Change: when pass FD object to argument array (
@( )
), throwArgumentError
- Breaking Change: not allow
Nothing?
expression in case pattern - improve error message of type lookup errors
- report correct position of invalid type elements
- report more detailed error message for invalid type elements
- allow user-defined type to override builtin methods
- Breaking Change: completion after
importenv
keyword only complete valid env names - Breaking Change: change Error type with
ArgumentError
in some builtin methodsFD
type constructorModule#_func
LineEditor#action
,LineEditor#bind
- Breaking Change: change return value of
String#realpath
- now throw Error when cannot resolve real path
- Breaking Change: now import some environmental variables by default
HOME
,PATH
,PWD
,OLDPWD
,USER
,LOGNAME
- improve time format handling of builtin printf command
- support
%N
time specifier for nanoseconds time printing - support nanoseconds epoc time string like
1689511935.00023
- allow negative epoc time
- support
- Breaking Change: remove
path
. useString#basename
,String#dirname
instead
- fix zypper completion path
textDocument/completion
shows variable/function/field/method type signaturetextDocument/hover
shows command line usage in the following context- user-defined type with CLI attribute
- user-defined command having parameter
textDocument/references
always resolve actual declaration position- if specified position does not indicate declaration, find declaration before reference lookup
- now can find all references of builtin commands
- fix wrong job-control checking in child process
- fix wrong open flag in stdin redirection to /dev/null
- fix unix time parsing of builtin printf command
- backslash handling in regex literal
- option parsing of builtin echo command
- fix common super type resolution that have unresolved type
- common prefix resolution of completion candidates that having multi-bytes characters
- fix code generation of defer block in loop expression
- fix indexing of user-defined type member when access from constructor
- support
if-let
optional binding- like swift, bind unwrapped value to variable (only visible in then block)
if let a = "hgoe".realpath() { echo $a; }
- like swift, bind unwrapped value to variable (only visible in then block)
- support
as?
optional cast- if cast failed, return invalid instead of
TypeCastError
- if cast failed, return invalid instead of
- add builtin
printf
command- unlike bash or zsh,
%c
specifier accept grapheme cluster - in addition to printf style format, add the following conversion specifier
%b
: interpret backslash escape sequences%q
: quote as shell argument%(fmt)T
: interpretfmt
as time format (likestrftime
)
- precisions of
%b
,%q
,%s
are grapheme cluster counts - for portability, impose the following restrictions
- skip '-', ' ' flags if argument is NAN
- always use quiet NAN
- forbid INT32_MIN as field width
- unlike bash or zsh,
- add
beginning-of-buffer
,end-of-buffer
edit action toLineEditor
LineEditor
support kill-ring- store removed text to kill-ring in the following action
kill-line
,backward-kill-line
,kill-word
,backward-kill-word
- add
yank
action (ctrl-y)- insert latest kill-ring entry
- add
yank-pop
action (alt-y)- rotate kill-ring entry
- add
kill-ring-select
custom action- select and insert from whole kill-ring entries
- store removed text to kill-ring in the following action
textDocument/publishDiagnostics
emit warning diagnostic- meaningless cast op
- variable shadowing
- type-alias shadowing
- unused local variables
- unused type-alias
- Breaking Change: restrict implicit bool coercion for
FD
,T?
type- only allowed in the following conditional context
- if, for, while, assert
- only allowed in the following conditional context
- Breaking Change: change
Any
type expression toString
cast semantics.- now do not perform string coercion (to-string)
- Breaking Change: drop support smart-cast
- use if-let optional binding instead
- Breaking Change: change type checking of if-elif-else chain, now like case expression
- Breaking Change: change syntax of user-defined type definition without
()
- now implicitly define constructor parameters
typedef Interval { let begin : Int let end : Int }
- Breaking Change: now check signals in basic block end (jump op) or command call
- previously check signals before instruction dispatch
- Breaking Change: do not allow
FD
type expression in@( )
- adjust error message layout and colors
- improve semantic error messages
- show
did you mean ?
suggestions for undefined variable, undefined field/method, undefined type - catch type
- Option type within string interpolation / parameter expansion
- unwrap op
- nested job operator
- show
- reimplement
Map
object. now always preserve insertion order - cancel glob expansion in source statement
- change common super type resolution of
if
,case
, loop with break expression.- now resolve
T?
type in the following cases$true ? 45 : $none # Int? type
- now resolve
- Breaking Change: change
OSTYPE
definition, nowOSTYPE
is not equivalent to uname resultlinux
,darwin
,cygwin
,emscripten
- Breaking Change: change return value of
Map#remove
method, now returns removed value - Breaking Change: in user-defined completer, escape prefix tilde of last arguments if no tilde expansion
LineEditor#readLine
method shows row numbers in completion pager if actual rows are larger than rendered rows- check read string length in builtin
read
command - check iterator invalidation of
reply
variable within some builtin commandsprintf
,read
,shctl info
- change return value of
FD#lock
,FD#unlock
method - correctly report io errors in some builtin commands
__puts
,complete
,echo
,printf
,setenv
,pwd
,cd
,pushd
,popd
,dirs
umask
,ulimit
,hash
,shctl
,kill
- in ydsh completion, complete command names after
-e
option - in builtin kill completion, complete PIDs from fzf-based selector
- in
completion
module, perform tilde expansion if path prefix start with tilde - in
completion
module, remove suffix.exe
ifOSTYPE
ismsys
- change return value of
DSState_setArguments
- now check length of args
- brace expansion error checking in source statement
- broken error line marker of binary op
- local functions do not capture constructor parameters
- do not ignore newline in case expression even if within parenthesis
- missing line refresh after completion and hist-sync callback
- bugfix soft-wrap handling in line editor
- re-implement row/column counting
- adjust tab width counting, now include prompt column length
- bugfix pager cursor move (left/right/forward)
- fix CPackRPM dockerfile if run under GitHub Actions
- support here document (
<<
,<<-
)- unlike bash/zsh, double-quoted strings are not allowed in here doc start word
- support
textDocument/definition
,textDocument/references
,textDocument/hover
- also support completion
- various
LineEditor
improvements- support alt-arrow key (for mac)
^[^[[A
,^[^[[B
,^[^[[C
,^[^[[D
- add
insert-keycode
actionCTRL-V
like bash/zsh
- quote unprintable characters / invalid utf8 bytes
- support custom keybinding/custom key action via the following keybinding methods
bind
: change keybindingbindings
: get read-only snapshot of current keybindings- modification of the result does not affect actual keybindings
action
: define custom key actionactions
: get read-only snapshot of current edit actions
- add
setHistSync
method- set callback that is called when adding current line to history
- improve unsupported terminal detection
- check if current process belongs to foreground process group
- always use tty even if stdin/stdout is not tty
- improve internal I/O error reporting
- disable bracketed paste mode when restore tty setting
- allow input strings/prompts that have null characters
- add completion candidate pager
- support alt-arrow key (for mac)
- add builtin
disown
command - add directory stack related builtin commands
dirs
: show directory stack entriespushd
: change current directory and save old onto the directory stackpopd
: remove an entry from directory stack- also add
DIRSTACK
global variable
- add
Array#removeRange
method- remove elements by specified range
- add
String#quote
method for generate string that is used as command argument - add
Nothing?
type constants for invalid value of option typeNONE
,None
,none
- add
fzf
module forfzf
integration- now
CTRL-R
action (history search) is defined as custom action in this module - also support
CTRL-T
,ALT-C
keybinding
- now
- Breaking Change: in interactive mode or
-c
mode without shell-name, toplevel$0
indicatesargv[0]
- Breaking Change: unbalanced brace expansions are semantic error
- Breaking Change: change some token format errors with semantic errors
- Breaking Change: overhaul runtime/compile-time tilde expansion
- in source statement
~+
,~-
style expansions are not performed - support
~+N
,~-N
,~N
style expansions- internally use
DIRSTACK
variable
- internally use
- now
~+
,~-
expansions do not check path existence
- in source statement
- Breaking Change: change user-defined completer interface
- now
(Module, [String], Int) -> [String]?
type - does not quote completion candidates that user-defined completer return
- now manually quote within user-defined completer if needed
- now
- Breaking Change: change abbreviate notation of
Option
type- now abbreviate as
T?
- now abbreviate as
- Breaking Change: remove
Func
type (base type of function type) due to unused - Breaking Change: does not skip carriage return character as newline
- Breaking Change: when specify
-i
option, always use tty even if stdin is not tty - Breaking Change: now propagate exit/assertion error from readline callback
- Breaking Change: change
CMD_FALLBACK
interface with((Module, [String]) -> Bool)?
- Breaking Change: change optional module import syntax
source?
- Breaking Change: rename builtin
eval
command withcall
eval
is still builtin command for future usage
- Breaking Change: invalid utf8 bytes are always grapheme/word boundary
- Breaking Change: in finally/defer block, do not ignore exceptions that can be caught within finally/defer block
- show stack trace of ignored exceptions within finally/defer block
- improve some semantic error messages
- allow
Nothing?
type - complete
typeof
keyword in type name completion
- Breaking Change: change default key action of
alt-left
,alt-right
withbackward-word
andforward-word
- Breaking Change: now builtin commands support
-h
/--help
options- except for
:
,call
,echo
,eval
,false
,test
,true
- except for
- Breaking Change: check array size modification during
Array#sortWith
method- now throw
InvalidOperationError
- now throw
- Breaking Change: now do not allow negative value of INT_MIN in constant expression
Module#_fullname
method for user-defined commands always returns unique fully qualified names- builtin
shctl info
subcommand shows more system constant information
- Breaking Change:
DSState_readLine
api- report internal error via
DSError
- explicitly pass read buffer
- allow strings that contain null characters
- report internal error via
- symbol range of
textDocument/hover
,textDocument/definition
- broken help message of builtin
ulimit
command - invalid insertion position of completion candidate prefix
- broken analyzer state when reuse analyzer instance
- add workaround for running under screen/tmux
- disable character width detection
- fix skippable newline handling in
for
,typeof
- fix error line marker of anonymous functions that have empty body
- floating point exception from integer division (-9223372036854775808 / -1)
- now throw
ArithmeticError
- now throw
- crash when specified
-A tilde
option to builtincomplete
command - crash when completion candidates have empty string
- complete executable file names in
call
,command
,exec
,sudo
completion - fix command name completion in multi-line
- bugfix code generation of try-finally/defer
- fix broken stack unwind in try expression
- now maintain try block level
- bugfix code generation of case expression with option type expression
- support mutual recursion of named function, method, user-defined command
- now the following code is valid
function even(n : Int) : Bool { if $n == 0 { return $true } else { return $odd($n - 1) } } function odd(n : Int) : Bool { if $n == 0 { return $false } else { return $even($n - 1) } }
even
can refer backward defined functions that are defined immediately after it
- now the following code is valid
- add anonymous user-defined command
- anonymous user-defined command object is
Command
type - call command via
Command#call
methodvar cmd = (){ echo $0: $@ } $cmd.call(['name', 'arg1', 'arg2'])
- anonymous user-defined command object is
- introduce dynamic registered user-defined commands
- before lookup external command, lookup
Command
object from builtinDYNA_UDCS
variable- builtin
command
command checks existence of dynamic registered commands, but does not call theme ( builtineval
command can call these commands) Module#_fullname
method also supports theme
- builtin
- also complete dynamic registered command names
- before lookup external command, lookup
- add
clobber
runtime option- enable by default
- if disabled,
>
and&>
redirection failed if file exists - also add
>|
and&>|
redirection (always overwrite file even if clobber is disabled)
Error
type objects maintain exit status- now specify exit status to constructor
- add
Error#status
method for get exit status
- add some options to builtin
complete
command-q
: does not show completion candidates (but still set toCOMPREPLY
)-s
: append space to completion candidate when number of candidates is 1
- add
LineEdtior
type for line editingreadLine
: entry point of line editingsetCompletion
: specify completion callbacksetPrompt
: specify prompt callbacksetHistory
: specify history callbacksetColor
: specify syntax highlight color theme- also support multi-line editing
- CTRL-U, CTRL-K, CTRL-A, CTRL-E, CTRL-R are multi-line aware
- CTRL-T is grapheme-aware
- support ALT-Up, ALT-Down for multiline-aware history rotating
- support ALT-Left, ALT-Right for alternative of home/end key
- add builtin
LINE_EDIT
variable for repl api - add some methods to
FD
typevalue
: get internal file descriptor numberlock
: place exclusive lockunlock
: remove existing lock
- add
DSState_readLine
api for line editing- control line editing behavior via
LINE_EDIT
builtin variable
- control line editing behavior via
- update
dscolorize
- add
--html-lineno-table
option- now generate line number as table
- add
--dump
option- dump color setting
- add
- Breaking Change: change evaluation order of
TERM_HOOK
- now only called from
DSState_delete
or subshell exit - in interactive mode, does not call
TERM_HOOK
in uncaught exception
- now only called from
- Breaking Change: improve error checking of back-quote literal
- now syntactically accept back-quote literal, but always report semantic error
- now does not allow back-quote characters without escape within double-quoted string literal
- Breaking Change: change internal implementation of
SCRIPT_DIR
,SCRIPT_NAME
- now
SCRIPT_DIR
andSCRIPT_NAME
are always equivalent toModule#_scriptDir
andModule#_scriptName
- in interactive mode, after change CWD, compile-time
SCRIPT_DIR
and run-timeSCRIPT_DIR
are different- run-time
SCRIPT_DIR
always indicates latest compile-timeSCRIPT_DIR
- run-time
- now
- Breaking Change: now does not ignore empty string in command arguments
var a = '' echo $a a # output is ' a' echo ${['', 'a']} # output is ' a'
- Breaking Change: allow positional arguments up to INT32_MAX decimal
- now
"${34}"
indicates positional argument (does not indicate int literal) - also allow redundant prefix
0
, such000
,0009
- always synchronize current
@
content
- now
- Breaking Change:
#
variable always indicates current@
size - Breaking Change: disallow relative glob pattern in source statement
- Breaking Change: overhaul io redirection
- support
<&
operator - now
&>
and>&
are different semantics <
,>
,>>
,&>
,&>>
operators only acceptString
expression- when redirect to
FD
object, use>&
or<&
instead
- when redirect to
1>&2
and2>&1
are recognized as1>& 2
,2>& 1
- now support
[n]> word
style notation.[n]
indicate decimal file descriptor numbers (only allow 0, 1, 2)
- support
- Breaking Change: change user-defined method
- now only allowed for user-defined type that defined at same module
- cannot define same name method as field
- Breaking Change: overhaul exception handling
- now only throw and catch derived types from
Error
type
- now only throw and catch derived types from
- Breaking Change: improve smart cast.
- also support option type auto-unwrap
- supported like the following context
## auto down cast var e = -45 as Any if $e is Int { assert $e.abs() == 45 } assert ($e is Int ? $e.abs() : 0) == 45 assert $e is Int && $e.abs() == 45 ## auto unwrap var o = '34'.toInt() if $o { assert $o == 34 } assert ($o ? $o : 0) == 34 assert $o && $o == 45
- Breaking Change:
errraise
option ignore SIGPIPE failure in left hand-side of pipe by default- if check SIGPIPE failure, set
failsigpipe
option
- if check SIGPIPE failure, set
- Breaking Change: does not skip newline after command except for skippable newline context
- now following code is syntax error
while true # does not skip newline after command { }
- now following code is syntax error
- Breaking Change: now check tilde expansion failure
- check tilde expansion failure in runtime/compile time (also within glob/brace expansion)
- now report runtime tilde expansion failure as
TildeError
- improve the following error messages
- unclosed string, back-quote, regex literal
- io redirection
- improve error message and line number within parenthesis
- Breaking Change: change interface of
CMD_FALLBACK
- now pass caller module context to fallback handler
- Breaking Change: only allow decimal integer in
test
command like bash - Breaking Change: FD type constructor does not set close-on-exec flag
- Breaking Change: remove
EDIT_HOOK
builtin variable - Breaking Change: change typechecking of equality operator of Func type
- now allow subtype expression in right hand-side
- Breaking Change: change
String#realpath
behavior- now does not perform tilde expansion
- now does not accept string having null characters
- improve runtime option recognition
- now allow upper case, snake case, kebab case
shctl set TRACE_ON_EXIT Null-Glob
- now allow upper case, snake case, kebab case
- save currently added history entry immediately
- rename edit module with repl
- now import completion scripts
- re-implement bash completion wrapper in completion module
- no longer need foreign completion wrapper
- Breaking Change: remove the following api
DSState_setExitStatus
DSState_complete
DSState_getCompletion
DSState_lineEdit
DSState_showNotification
- Breaking Change: remove daemon mode in
dscolorize
- auto-generate rcfile at startup
- broken error check of glob in
source!
statement - broken error check of runtime glob expansion when
nullglob
option is enabled - fix number parsing in some builtin commands
- now only allow decimal number except for explicitly requiring hex/octal numbers
- allow redundant prefix 0
- crash indexing of source statements that have glob/brace expansion
- fix module symbol synchronization of
DSState_loadModule
api - crash
Signal#trap
method when pass closure - type name completion in constructor parameter
- broken lexing of dollar single quoted string literal
- escape sequence handling of renderPrompt function in prompt module
- skippable newline handling in some expressions
- SEGV of
textDocument/documentSymbol
,textDocument/documentLink
- fix
textDocument/publishDiagnostics
emission
- accidentally close FD object within nested user-defined command
- pid range checking of
Signal#kill
method
- add
time
expression- like bash or zsh,
time [pipeline]
- like bash or zsh,
- support optional arguments in func, method, constructor call
- can omit last argument that types are Option type
function sum(a : Int, b : Int!) { return $a + ($b ?? 0) } assert $sum(23, 23) == 46 assert $sum(34) == 34 # last parameter is Option type
- can omit last argument that types are Option type
- unpack key-value pair during map iteration
for k, v in ['a' : 12, 'b': 34] { echo $k $v }
- add builtin signal constants (POSIX.1-1990 standard signal)
SIGABRT
,SIGALRM
,SIGCHLD
,SIGCONT
,SIGFPE
,SIGHUP
,SIGILL
,SIGINT
,SIGKILL
,SIGPIPE
,SIGQUIT
,SIGSEGV
,SIGSTOP
,SIGTERM
,SIGTSTP
,SIGTTIN
,SIGTTOU
,SIGUSR1
,SIGUSR2
- add
String#sanitize
method- replace invalid utf8 bytes and null characters
- add
String#words
method- split string with words (follow Unicode word boundary)
- add the following regex flag check methods
isMultiLine
isCaseless
isDotAll
- add builtin
jobs
command- show job information (except for disowned jobs)
- add the following line edit op
DS_EDIT_NEXT_CHAR_LEN
,DS_EDIT_PREV_CHAR_LEN
: for unicode-aware character length countingDS_EDIT_NEXT_WORD_LEN
,DS_EDIT_PREV_WORD_LEN
: for unicode-aware word length countingDS_EDIT_HIGHLIGHT
: for syntax highlighting
- add
DSState_showNotification
api for job termination notification
completion
module autoload bash-completion script
- Breaking Change: remove signal literal. use signal constants instead
- Breaking Change: cancel code completion when user-defined completer throws an error
- Breaking Change: not allow explicit cast from
Nothing
type - Breaking Change: change operator precedence of
coproc
- like zsh,
coproc [pipeline]
- like zsh,
- Breaking Change: in command argument, perform tilde expansion after
=
dd if=~ of=/somewhere # expand 'if=~' to 'if=$HOME'
- also perform file name completion after
=
- except for redirection target and source path
- also perform file name completion after
- Breaking Change: change command substitution behavior
- always disable job-control in command substitution
- propagate IO error as
SystemError
- cancel command substitution by SIGINT
- Breaking Change: during sub-shell creation, not clear job entry
- for builtin
jobs
command within sub-shell
- for builtin
- Breaking Change: after background job termination, not show signal message
- not show signal messages after call
Job#poll
,Job#wait
, builtin wait command
- not show signal messages after call
- Breaking Change: remove multi-return type due to unused
- Breaking Change: disable job control within subshell even if monitor option is enabled
- show job information via CTRL-Z/
fg
/bg
- escape unprintable character when throw some errors
- improve method lookup error messages
- change actual name of
Boolean
,UnixFD
typeBoolean
->Bool
UnixFD
->FD
- old type name is still valid name (now defined as type alias)
- Breaking Change: change signal related methods
- remove
Signals#[]=
,Signals#signal
methods - add
Signals#[]
,Signals#get
methods for get corresponding signal- if corresponding signal is not found,
Signals#[]
method throwsKeyNotFoundError
- if corresponding signal is not found,
- add
Signal#trap
method for get and set signal handler corresponding to signal
- remove
- Breaking Change: replace invalid utf8 byte with replacement character (U+FFFD) in the
following
String methods
charAt
chars
width
- iterator
- Breaking Change: remove
String#to
,String#from
,Array#to
,Array#from
methods- use slice method instead
- Breaking Change:
Regex#replace
method internally usepcre2_substitute
api- now expand meta characters during replacement
- Breaking Change:
Regex
methods throwRegexMatchError
instead ofInvalidOperationError
- Breaking Change: change
String#toInt
method behavior with other programming languages such golang, java- now
'0xFFFFFFFFFFFFFFFF'.toInt()
is out-of-range
- now
- Breaking Change: rename
isNan
method withisNaN
inFloat
type - now some builtin variables are constants
ON_ASSERT
,ON_ERR
,ON_EXIT
TRUE
,True
,true
FALSE
,False
,false
- for optional argument, change last parameter type with Option type in the following builtin
methods
Regex#init
String#slice
Array#slice
Array#join
- specify east-asian width to
String#width
method - specify start index to
String#indexOf
,Array#indexOf
methods - specify radix to
String#toInt
method
- Breaking Change: change interface of
DSState_complete
- now get completion candidates from
DSState_getCompletion
api - add
DS_COMP_ATTR_NOSPACE
attribute
- now get completion candidates from
- Breaking Change: change interface of
DSState_lineEdit
- introduce
DSLineEdit
struct
- introduce
- after
DSState_createWithMode
, setLC_NUMERIC
toC
- adjust space insertion behavior after inserting completion item
CTRL-W
op (delete previous word) is now unicode-aware- follow Unicode word boundary
- support
M-b
,M-f
,M-d
- Breaking Change: remove completion-wrapper. now use foreign
bcrun
instead- now support
bash-completion
-aware completion scripts
- now support
- invalid string in ast dump
- not propagate unreachable code error from loaded module
- incorrect line number after call
DSState_loadModule
api - not perform file name completion after
:
- broken hex escape sequence handling in dollar string and echo command
- line marker of nested pipeline
- broken lexer state in prefix assignment parsing
Broken Pipe
signal message after evaluation of last-pipe- infix keyword completion
- PATH handling of sudo completion
- length error of brace expansion
- broken float number parsing (prefix spaces, locale dependent-format)
- allow anonymous function in local scope
- can access upper scope variables (except for fields, temporary environmental variables)
- support brace expansion in command argument list and source statement
- add
xtrace
runtime option- trace execution of commands
- also support
-x
command line option
- add experimental
errraise
runtime option- in statement context, if exit status of command is non-zero, raise
ExecError
- in statement context, if exit status of command is non-zero, raise
- allow
UnixFD
type infor-in
expression- read each lines during iteration (for more efficient alternative of while-read pattern)
ls | for $e in $STDIN { echo $e }
- pass module context (module descriptor) to user-defined completer (
COMP_HOOK
)- also pass module context to builtin
complete
command via-m
option
- also pass module context to builtin
- add the following methods to
Error
typelineno
: get line number of occurred locationsource
: get source name of occurred location
- support the following requests
textDocument/documentHighlight
textDocument/documentLink
textDocument/documentSymbol
- add standalone syntax highlighter called
dscolorize
- support the following output formats
- ANSI color codes for true-color terminal, 256-color terminal
- HTML
- support the following output formats
- Breaking Change: clear exit status when enter catch block
- cancel runtime glob/brace expansion by SIGINT
- cancel runtime code completion by SIGINT
- show sub-shell level when handle uncaught exception
- deprecate
import-env
,export-env
keywords. now useimportenv
,exportenv
instead. - omit
$
sigil in parameter declarations (catch, function, constructor, for-in) - improve token format error messages
- Breaking Change: remove
Array#forEach
method due to unused - Breaking Change: throw
InvalidOperationError
when callModule#_func
method within user-defined completer - Breaking Change: change error message of
SystemError
- Breaking Change: remove
shctl show
sub-command- now use
shctl set
sub-command instead
- now use
- add some options to
shctl set
sub-command-d
option for dumping current runtime options-r
option for restoring runtime options from dump- if options is not specified, show current runtime option setting
shctl module
sub-command now finds and prints full path of specified modules- throw
ArithmeticError
when callInt#abs
,-
to INT_MIN
- Breaking Change: change config section names in
workspace/didChangeConfiguration
- can disable semantic highlight
- Breaking Change: pass completion context to completer module
- temporary disable 32bit support
- revert 'linenoise io error checking' due to broken error reporting
- directory detection of completion wrapper
- return type resolution of anonymous function that last statement is Nothing type
- file name completion in prefix assignment
- invalid
SCRIPT_DIR
in module name completion - object destruction order of tuple, user-defined type, closure
DSSatte_lineEdit
does not set default prompt when internalEDIT_HOOK
throw error- emit diagnostics to wrong textDocument
- broken
CHECK_RE_IF
,CHECKERR_RE_IF
parsing - invalid user-defined type name format in hover
$
in double-quoted string literal
- define no-return user-defined command
- type of non-return user-defined command is
Nothing
usage() : Nothing { echo 1>&2 [usage] $@ exit 2 } $1 :- usage require argument
- type of non-return user-defined command is
- define custom error type like the follow
typedef LogicError : Error assert (new LogicError("hello") is Error)
- support user-defined type
typedef IntList($v : Int) { var value = $v var next = new IntList!() }
- support user-defined method
- define method for arbitrary types (except for
Void
,Nothing
) in current module scope- access receiver via
this
variable
- access receiver via
- also, lookup methods defined for super type (such as
Any
,Error
) - in method call syntax, if field and method have the same name, give priority to method
function factorial() : Int for Int { return $this == 0 ? 1 : $this * ($this - 1).factorial() } 10.factorial()
- define method for arbitrary types (except for
- when call uninitialized method/constructor, throw
IllegalAccessError
- add
defer
statement- like swift,
defer
statement evaluated in end of scope (block, function, user-defined command) - preserve exit status during the evaluation of defer statement
- like swift,
- add the following builtin constants
DATA_HOME
: indicatesXDG_DATA_HOME/ydsh
CONFIG_HOME
: indicatesXDG_CONFIG_HOME/ydsh
MODULE_HOME
: indicatesXDG_DATA_HOME/ydsh/module
- add
DSState_config
api for runtime system configuration query
- support the following methods/notifications
workspace/didChangeConfiguration
- now change server configuration at runtime
- change command name/command argument completion setting
textDocument/semanticTokens/full
- add
CHECK_RE_IF
,CHECKERR_RE_IF
directive tolitecheck
- Breaking Change: finally-less try expression is now syntax error (previously semantic error)
- Breaking Change: change typechecking of parameter expansion
- change error message when pass
Option<T>
to command arguments - do not allow concatenation of
Any
type expression
- change error message when pass
- Breaking Change: change invalid value handling of string interpolation/parameter expansion
- if contain invalid values, just ignore theme
- Breaking Change: change string interpolation/parameter expansion of
Map
type- expand like
Array
,Tuple
type
- expand like
- Breaking Change: now follow XDG Base Directory Specification
- now local module directory (aka
MODULE_HOME
) indicatesXDG_DATA_HOME/ydsh/module
- now local module directory (aka
- improve error reporting
- module private member access
- read-only symbol/field access
- no-return expression checking in finally-block
- illegal concatenation of parameter expansion
- only available in global scope
- preserve exit status during the evaluation of finally-block
- complete type template, such as
Array
,Map
,Tuple
,Option
- do not complete methods that do not satisfy type constraints
- Breaking Change: change all method name of
Module
type due to prevent potential name conflictfullname
to_fullname
func
to_func
scriptDir
to_scriptDir
scriptName
to_scriptName
- Breaking Change: change default rcfile path to
DATA_HOME/ydshrc
- Breaking Change: in
edit
module, change defaultHISTFILE
toDATA_HOME/ydsh_history
- brew: fix bash completion script path
- type error reporting of tuple/func type creation if size of these elements reaches limit
textDocument/Hover
,textDocument/definition
andtextDocument/references
do not work in large files- broken code generation of named imported env variables
- broken parameter expansion of
[UnixFD]
type. previously the following code is failedassert diff ${[<(ls), <(ls)]}
- cannot define type alias for
Void
,Nothing
- error line marker of
assert
statement - potential operand stack corruption when use
break
orcontinue
expression within call arguments - return status of
DSState_loadModule
api when detect symbol conflicts - negative number or out-of-range number handling of
SHLVL
in startup time - out-of-range Unicode handling in dollar string and echo command
- broken code generation of finally-block within nested try-loop
- broken invisible character escaping of command arguments
- add the following runtime options
huponexit
: if on, when callexit
command, sendSIGHUP
to managed jobsassert
: if on, check assertion- now assertion is enabled/disabled at runtime
- support anonymous function
- define anonymous function like the follow
function($a : Int) => $a * $a
- currently, only allow top-level scope
- define anonymous function like the follow
- add runtime compilation api
- compile string (single expression) as anonymous function via
Module#func
method - compiled function can access global variables visible in receiver module
- compile string (single expression) as anonymous function via
- complete infix keywords
as
,is
,and
,or
,xor
,with
in
,elif
,else
,catch
,finally
,inlined
- add subtype relation of func type
- if
T0 <: T1
,T2 <: T3
then(T1) -> T2 <: (T0) -> T3
- if
- add
info
sub-command to builtinshctl
command- now show runtime configuration (also get via
reply
variable)
- now show runtime configuration (also get via
- add builtin
MODULE
variable for indicating currentModule
object - add the following methods to
Module
typescriptName
: getSCRIPT_NAME
of modulescriptDir
: getSCRIPT_DIR
of modulefunc
: compile string as single expression functionfullname
: resolve fully qualified command name
- add the following methods to
String
typewidth
: count width of grapheme clusterscontains
: check if contains substring
- add the following methods to
Array
typeforEach
: apply function to each elementaddAll
: add all elements of otherArray
objectindexOf
: get first index of element equivalent to specified objectlastIndexOf
: get last index of element equivalent to specified objectcontains
: check if contains specified object
- add the following methods to
Map
typeaddAll
: add all elements of otherMap
objectputIfAbsent
: put value if key does not found
- support the following methods/notifications
textDocument/publishDiagnostics
textDocument/completion
- add
litecheck
file checker like LLVM lit/FileCheck or littlecheck- support the following directives
RUN
REQUIRE
CHECK
,CHECK_IF
,CHECK_RE
CHECKERR
,CHECKERR_IF
,CHECKERR_RE
STATUS
- support the following directives
- experimental support linux on arm32
- Breaking Change: change exit status of command error
- if command not found, set exit status to 127
- if permission error, set exit status to 126
- Breaking Change: change operator precedence of
throw
expression.- now the precedence is equivalent to
return
- now the precedence is equivalent to
- set
PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK
option if pcre2 10.38 or later - remove redundant signal handler installation when recursively call interpreter
- not change signal handler for
SIGKILL
,SIGSTOP
- internal sigaction does not accept these signals
- Breaking Change: remove
fullname
subcommand ofshctl
- now use
Module#fullname
method instead
- now use
- Breaking Change: slice methods of
String
,Array
type no longer raise any exceptions- like python, if slice index is out of range, round index within range
- Breaking Change: remove some
Array
,Map
methodsArray#extend
: useArray#addAll
insteadMap#find
: useMap#get
insteadMap#default
: useMap#putIfAbsent
instead
- Breaking Change: rename
Error#backtrace
method withError#show
- reduce every-time rebuild per
textDocument/didChange
- now build tasks run in background worker
- improve
textDocument/hover
- support builtin variables
- support tuple fields
- support builtin methods
- show command descriptions
is-sourced
sub-command ofshctl
- accidentally skip termination handler in loaded module
- not ignore non-regular files in file path search
- not complete statement when previous token is newline
- segmentation fault when invalid compare functions are supplied to
Array#sortWith
method- now replace internal
std::stable_sort
with merge sort
- now replace internal
- cannot parse
Float
literal like34.2e00
- abort if error line has invisible characters
- length checking of pipeline
source
statement support inlined import- inlined imported global symbols are transitively imported from other modules
source edit inlined # module 'edit' is inlined imported
- add
Float#compare
method- total order comparison function equivalent to Java (Double.compare)
- auto-detect emoji sequence width before prompt rendering
- basic support the following methods/notifications
textDocument/didOpen
textDocument/didChange
textDocument/didClose
textDocument/definition
textDocument/references
textDocument/hover
- Breaking Change: fix error location in the following statement
- variable declaration
- function definition
- command definition
- type alias definition
- source statement
- Breaking Change: statically determine user-defined command
- eliminate runtime user-defined command lookup
- disallow user-defined command call defined in backward of the call-site
- Breaking Change: change internal hash/equality function of
Map<Float, T>
object- now check equality by total order
- change hash code
- hash(-0.0) != hash(0.0)
- hash(NAN) == hash(NAN)
- Breaking Change: fix string representation of
Float
objectinf
=>Infinity
-inf
=>-Infinity
nan
=>NaN
- require CMake 3.8 or later
- infix keyword parsing in the following
in
,as
,is
,and
,or
,xor
,with
,elif
- in completion, ignore keywords/commands starting with identifier if previous token is the
following
in
,and
,or
,xor
,elif
- do not complete if previous token is a comment
- error message of for-expression
- raise error when access loaded module via
DSState_loadModule
api
- dollar string literal support unicode escape sequence (\u \U)
- add
String#chars
method- split string as grapheme cluster array
echo
command support unicode escape sequence (\u \U)- add builtin
wait
command- also support
-n
option
- also support
- Breaking Change: disallow signal sending to sibling jobs
- Breaking Change: disowned job object still maintains valid job id
- job table still maintains job id of disowned job
- job id of disowned job is no longer reassigned to newly attached job
- Breaking Change: escape sequence handling in dollar string literal
- hex escape sequence (\xHH) require 1~2 hex digits (not exactly 2 hex digits)
- octal escape sequence (\xnnn) require 1~3 octal digits (not exactly 3 octal digits)
- Breaking Change: return value of
Job#pid
method - Breaking Change: some string method handle grapheme cluster
String#count
count grapheme clusters in stringString#charAt
get grapheme cluster at specified position- iterate grapheme cluster in string
- Breaking Change: after call
Job#wait
, not close internal fds - propagate internal error as exception from regex method
left =~ right
,left !~ right
Regex#match
,Regex#replace
- use stable sort in
Array#sortWith
method
- change minimum required compiler version for gnu++17 support
- gcc 7
- clang 6
- update
re2c
to 2.1.1 - reactivate ydshd installation
Job#status
method return correct exit status when internal process already waited- after call
Job#poll
method, if job is terminated, removed from job table - remove redundant '/' in file name completion
- introduce fully qualified command name
- builtin
eval
command can accept fully qualified command name - builtin
command
command support fully qualified command name
- builtin
- add PowerShell like array literal
@( )
- add
fullname
subcommand to builtinshctl
- resolve fully qualified command name from specified module
- add and change the following completions
- brew
- sudo
- Breaking Change: not access private builtin variables
_cmd_fallback_handler
_DEF_SIGINT
- Breaking Change: source name of builtin variable
(embed)
to(builtin)
- Breaking Change: not skip last spaces when mismatched token is EOS
- Breaking Change: when access uninitialized user-defined command, throw
IllegalAccessError
- not complete hidden variables
- support completion in prefix assignment
- improve parser error message
- remove meaningless error message when reach end of string
- quote expected tokens
- replace some no viable alternative error messages with more intuitive ones
- show number of characters in error line
- constructor lookup error message
- escape unprintable character when show command error message
- ignore newline within the following parenthesis
()
,[]
,${}
,$()
,@()
,<()
,>()
- Breaking Change: now use PCRE2
- use
PCRE2_ALT_BSUX | PCRE2_MATCH_UNSET_BACKREF | PCRE2_UTF | PCRE2_UCP
option - some char-classes such as
\s
,\w
matches unicode characters
- use
- builtin
command
andshctl fullname
check uninitialized user-defined command
- Breaking Change:
DSError
maintainschars
- not show error line marker when reach EOS and previous token size is 1
- not ignore null character in the following
- subcommand
- builtin
command
- builtin
exec
- error line marker
- constructor param type checking
- variable declaration with type
- bugfix
Regex#replace
method when replace with empty string - segv when call uninitialized user-defined command in interactive mode
- allow function call in command arguments
- ex.
echo $func(34, "hey")
- ex.
- module/scope aware type alias
- at named module import, implicitly define module type alias
source path as Path assert $Path is Path
- define type alias in local scope
- access type name defined in module
source path as Path assert $COMP_HOOK! is Path.Completer
- at named module import, implicitly define module type alias
- semantic aware completion
- complete field/method name
- complete local variable name
- complete type name
- complete user-defined command name from current scope
- complete subcommand name
- support bash style prefix assignment
- defined environmental variables in the following expression scope
IFS="" $(ls)
- if no following expression, treat as just assignment
IFS='AAA'
- if right hand side expression contains ':~', expand tilde
PATH=${PATH}:~/bin # equivalent to ${PATH}:/home/${USER}/bin
- defined environmental variables in the following expression scope
- add
Int
methodabs
- add some
Float
methodsabs
round
floor
ceil
trunc
isNormal
- add
tilde
function topath
module- perform tilde expansion for arbitrary string
- add completions for
- printenv
- which
- zypper
- perf
- bash completion wrapper
- Breaking Change: use
typedef
keyword for type alias definitionalias
keyword is still reserved keyword for future usage
- Breaking Change: when access undefined environmental variable, throw
IllegalAccessError
instead ofSystemError
- Breaking Change: evaluate script within separate module context
- Breaking Change: after runtime error, not discard symbol state
- Breaking Change: when modifying map object during iteration, always throw
InvalidOperationError
- Breaking Change: eliminate implicit tilde expansion like the follow
- external command name completion
- external command file path search
- allow
=>
in abbreviate type notation of Func type - allow
->
in arm expression - allow statement in for-init
- reimplement all completions on CodeCompletionHandler
- when access uninitialized global variable, throw
IllegalAccessError
- after uncaught error happened in interactive mode, uninitialized variables may exist
- Breaking Change: output format of
shctl module
subcommand - Breaking Change:
Float#toInt
method behavior- previously undefined behavior, but now is the same way as Java
- allow negative number index in string
[]
- Breaking Change:
DSState_loadAndEval
api does not accept null file name - Breaking Change:
DSState_loadModule
api evaluate script in root module context- when specified by
DS_MOD_SEPARATE_CTX
, evaluate script in separate module context - may report
DS_ERROR_KIND_FILE_ERROR
- when specified by
- cannot load module when module path indicates anonymous pipe
- in user-defined command, cannot pass
UnixFD
object to external command - code generation of
finally
block - cannot save history when ~/.ydsh_history does not exist
- stack consumption of
APPEND_MAP
ins - not treat escaped newline as space
- command argument parsing when following token is
(
- remove
cmd
from test case for cygwin - escape characters in env name completer
- escape handling in completer when character has already escaped
- add
??=
operator for Option type variableleft ??= right
ifleft
is invalid option value, assignright
toleft
Regex
literal supportss
flag.
character matches newline
- allow
Regex
constructor in constant expression - introduce
fastglob
option- breaking traditional glob behavior, but takes more efficient directory search strategy
- module aware user-defined command lookup
- command starting with
_
will be private command. private command is only called from its own module - in named import, call command defined in module as sub-command
- command starting with
- add
status
method toJob
type- get exit status of child processes in job
- add
replace
method toRegex
type- replace all of matched strings
- add
module
sub-command to builtinshctl
command- get full path of loaded script or module
- add builtin
_exit
command for force program termination without cleanup- call
_exit
function internally
- call
- builtin
complete
command supports-A
option- expose internal completion function
- add the following builtin variable
DATA_DIR
: indicatedatadir/ydsh
, ex. /usr/share/ydshMODULE_DIR
: indicate system module directory, equivalent to$DATA_DIR/module
YDSH_BIN
: indicate self executable path (in linux/proc/self/exe
)- if empty string, may be used as shared library
- add completions for
- builtin commands
- shctl
- cd
- pwd
- complete
- kill
- command
- eval
- exec
- git
- ninja
- fusermount
- ydsh
- sudo
- builtin commands
- add
DSState_initExecutablePath
for set full path of current executable toYDSH_BIN
- Breaking Change: perform regex syntax checking in type-checker. now regex syntax error is semantic error
- Breaking Change: not ignore previously raised exception in finally block
- Breaking Change: also enter finally block in exit or assertion failure
- Breaking Change: change install directory structure
share/ydsh
: system wide architecture-independent datashare/ydsh/module
: system modulesshare/ydsh/completion
: completion modules
- glob in source statement always use
fastglob
mode
- Breaking Change:
Regex
type constructor needs flag as second argumentnew Regex('abc', 'im')
- Breaking Change: remove
CONFIG_DIR
variable - null character handling in builtin method/builtin command
Regex
constructor does not accept strings having null charactersUnixFD
constructor does not accept strings having null characters- not ignore null characters in builtin commands
completion
- when command is not found, does not kick corresponding completer
- add
compdef
command for defining completer by declarative way
- Breaking Change: rename some public api
DSState_getExitStatus
toDSState_exitStatus
DSState_completionOp
toDSState_complete
DSState_lineEditOp
toDSState_lineEdit
- Breaking Change: return status of public api
- Breaking Change: change
unsigned short
tounsigned int
- Breaking Change: remove
DSState_configDir
api
..
pattern cannot match empty directory.- always set new
COMPREPLY
variable even if completion result is empty - not escape backslash in completer
- common super type resolution of case expression
- fix executable file checking in
command -v
option- always ignore directory
- segv in
is-sourced
sub-command ofshctl
- when abort symbol table, also abort loaded script path
- not crash public api when
DSState
parameter is null
- cannot load multiple globbed modules when source statement on end of file
- fix
CONFIG_DIR
variable path in RPM package
- more optimize DSObject memory layout
- add parameter expansion like binary string operator
left :- right
- if
left
is empty string, evaluateright
- if
left := right
- if
left
is empty string, assignright
toleft
- if
- support glob expansion in command arguments
- only support
?
and*
- add
nullglob
anddotglob
options
- only support
- relax syntax restriction of source statement, case expression
- improve constant expression
- allow the following builtin variables in constant expression
YDSH_VERSION
CONFIG_DIR
SCRIPT_DIR
SCRIPT_NAME
OSTYPE
MACHTYPE
- allow integer unary operator
- string interpolation
- allow the following builtin variables in constant expression
- allow glob expansion in source statement
break
,continue
,return
are treated as expression- eliminate fork of command or pipeline in command/process substitution, coproc, background job
- propagate
SIGINT
as SystemError in interactive mode - report code generation error
- add the following cast methods
Int#toFloat
Float#toInt
- add
show
,set
,unset
subcommand to builtinshctl
- support the following options
traceonexit
monitor
nullglob
dotglob
- support the following options
- add
SCRIPT_NAME
variable- indicating currently evaluating module script name
- builtin test command supports binary file operators,
-ef
,-nt
,-ot
- add
DS_ERROR_KIND_CODEGEN_ERROR
for code generation error reporting
- ast dumper format
- type check error message
- remove
--print-toplevel
option - remove
DSState_setScriptDir
api SCRIPT_DIR
variable indicates currently evaluating module script directory- not perform tilde expansion in the following public api
DSState_loadAndEval
DSState_loadModule
- environmental variable update rules at startup
- change
PWD
/OLDPWD
update rules at startup- if
PWD
is not set / not full path / not existing directory, setPWD
to cwd - if cwd is removed, set
PWD
to.
- if
OLDPWD
is not set / not full path / not existing directory, setOLDPWD
toPWD
- if
- always set valid value to
HOME
,LOGNAME
,USER
- change
- tilde expansion behavior
~+
,~-
is not expanded whenPWD
/OLDPWD
is invalid- use
HOME
env in~
if env is set
- source statement does not allow null characters
- when specified
--parse-only
option, not perform module loading - does not always handle/ignore
SIGBUS
,SIGSEGV
,SIGILL
,SIGFPE
signals due to undefined behavior - operator precedence of
throw
expression
- improve AArch64 support (on Raspberry Pi 4)
- reactivate some test cases in AArch64 build
- experimental support x86
- tested in ubuntu bionic x86 in docker container
- add build script for UBSAN
- improve LTO support
- reactivate RPM debuginfo build
- CMake 3.0 or later
- infinite loop of interactive mode in AArch64 build
- unnecessary module search in
DSState_loadModule
api specified byDS_MOD_FULLPATH
- byte code dump of module
- module name completion when cwd is changed
- module loading when cwd is removed
- when load RC file,
DS_OPTION_*
are not set yet - not expand symbolic link in module loading
- Ctrl-C handling in interactive mode
- merge
Int64
andInt32
type intoInt
- remove
Int64
related method - replace
Int64
withInt
Int
type representsint64_t
- remove
- simplify variable declaration with constructor call
var a = new T()
tovar a : T
- introduce inlined object for avoiding small object allocation
Boolean
Signal
Int
Float
- small string (up to 14 characters)
- optimize string concatenation
- simplify code generation
- avoids unnecessary memory allocation
DSState_*
api return$? & 0xFF
- add
shctl
command for runtime query/setting setenv
command shows all environmental variables when has no args
- before show prompt, insert newline when previous line is not terminated with newline
- auto-detect east asian ambiguous character width
- auto sync window size
- drop support
Int32
type - drop support
Int64
,Long
type - drop support Int64 literal suffixed with
l L
- change
-n
option behavior to the same as--compile-only
option - rename builtin *_env family
check_env
tocheckenv
set_env
tosetenv
unset_env
tounsetenv
- change return type of
Regex#match
method - change exit status of builtin
exit
command- parsed exit status is always
status & 0xFF
- parsed exit status is always
- merge
String#toInt32
andtoInt64
intotoInt
- newline handling in interactive mode
- SEGV when access aborted MethodHandle
- line number of command
- add missing error check to
String#replace
method
- support optional module import
- use 'source!' keyword
- support type constraints for builtin method by 'where' keyword
- introduce abbreviated type notation of Func type
- allow last comma in multi element tuple literal
- add
CMD_FALLBACK
for command-not-found handling
- remove
ps_intrp
command - overhaul String#slice, String#to, String#from, Array#slice, Array#to, Array#from methods
- allow start index equivalent to size
- disallow String#sort method when type parameter is not Value type
- merge
DSState_prompt
withDSState_lineEditOp
- drop
varName
parameter fromDSState_loadModule
- rename 'history' module with 'edit' module
- move prompt rendering function into 'prompt' module
- add 'renderPrompt' function for bash style prompt rendering
- add 'prompt' command for replacement of
ps_intrp
- add 'path' module
- 'dirname'
- 'basename'
- 'home'
- 'user'
- add 'PROMPT_HOOK' variable for primary prompt rendering
- add 'PROMPT_RENDERER' variable for custom prompt renderer
- add 'cnf' module
- improve error message of json validation
- support the following LSP method/notification
- initialized
- PS1 and PS2 variables are no longer builtin, now defined in 'edit' module
- use abbreviated type notation in string representation
- string representation of single element tuple object
- toplevel printing format
- now install experimental
ydshd
by default - experimental support Linux AArch64
- history saving when
HISTFILESIZE
is less thanHISTSIZE
- ignore module loading error when specify DS_MOD_IGNORE_ENOENT
- SEGV in String#join method
- not allow null characters in regex literal
- add builtin
CONFIG_DIR
variable for indicating system config directory - add builtin
PIPESTATUS
variable for indicating the latest status of pipeline - add builtin
COMP_HOOK
variable for user-defined completer - add builtin
EDIT_HOOK
variable for user-defined line editing function- support CTRL-R for history search
- drop support Byte, Int16, Uint16 type
- change integer literal syntax
- Int64 literal ends with 'l', 'L'
- octal number starts with '0', '0O'
- hex number starts with '0X'
- throw ArithmeticError when detect integer overflow
- auto unwrap option type value in case expression
- complete module name from module loading path
- correctly handle tilde expansion of file name completion
- support user-defined completer
- set completion result to
COMPREPLY
variable - complete keyword
- complete space when previous token is typing
- add
copy
method to Array type - add
copy
method to Map type - add builtin umask command
- allow negative number index in some Array type method
- test command correctly handle null character
- toInt32, toInt64 supports octal number starts with '0', '0O' and hex number starts with '0X'
- replace history api with 'DSState_lineEditOp'
- replace completion api with 'DSState_completionOp'
- string representation of Regex type
- max number of pipe chain is up to 250
- job table maintains enclosed command of process substitution
- not inherit parent process signal handler
- not allow user-defined signal handler for SIGBUS
- operator precedence
- null coalescing is right associativity
- throw expression
- coproc
- builtin 'REPLY' variable is writable
- drop support integer literal ended with 'i32', 'i64', '_i32', '_i64'
- file descriptor leak after execve
- unicode handling in linenoise completion
- process group of enclosed command in command substitution
- history loading
- '&', '&!', '&|' token parsing
- not terminate subshell in some internal vm api
- line continuation checking
- 'typeof' parsing
- unprintable character handling in completer
- stack allocation of user-defined command invocation
- infinite loop of encoding function
- SIGSTOP/SIGTSTP handling of command substitution
- typechecking of case expression
- disable top level printing in module
- improve module system
- private member support in module
- variable and function name starts with underscore is private member in module
- more stabilize
- dump module
- private member support in module
- introduce history module
- expose history buffer to HISTORY variable
- move some history related variables into module
- user-defined history command
- add
HISTIGNORE
- add 'join' method to Array
- add 'DSState_mode' function for execution mode inspection
- add 'DSState_getExitStatus' and 'DSState_setExitStatus'
- remove DS_OPTION_HISTORY
- rewrite history related api
- 'DSState_exec' can execute user-defined command and external command
- '$?' is writable
- remove history related variable
HISTSIZE
HISTFILE
HISTFILESIZE
HISTCMD
- remove builtin history command
- no longer clear termination handlers after call _defaultHook
- typechecking of Array, Map, Tuple literal
- Ctrl-D handling in '--parse-only', '--check-only', '--compile-only' mode
- variable name completion
- End of String handling
- default pattern handling of case expression
- module loading
- line number of module
- exec_test runner
- Signal type is used in Map key
- improve case-expression
- support Signal literal
- support double quoted string literal
- support Regex literal
- set environmental variable USER by default
- if ENOEXEC error happened in command execution, fallback to '/bin/sh'
- cleanup internal vm api
- introduce 'callMethod' and 'callFunction' api
- add some Array type methods
- shift
- unshift
- reverse
- sort
- sortWith
- add 'message' method to Signal type
- wrapper for 'strsignal'
- rewrite OP_STR, OP_INTERP, OP_CMD_ARG
- use callMethod api
- improve error handling of script/module loading
- improve file name completion in 'with', 'source' keyword
- complete environmental variable names
- complete command name when previous token is '&', '&!', '&|'
- support CPackRPM
- support platform detection in test directive
- not show signal terminated message in mid-pipeline
- debug logger format
- error message of circular reference error
- last pipe may cause SIGPIPE with child process
- delimiter handling of split method in String type
- require gnu++14 support
- gcc 5 or later
- clang 3.6 or later
- cmake 3.7 or later
- case expression parsing
- segmentation fault in code completion
- assert, import-env
- type checking of last pipe
- null character handling of io here
- null character handling of toplevel printing
- propagate fork-failure as SystemError
- allow nested option type
- nested option type is simplified to single option type ex. T!! -> T!
- break expression returns option type value
- add case-expression
- use 'case' keyword
- support the following pattern
- string
- int
- show signal message when terminated by signal
- support builtin ulimit command
- add some String methods
- replace
- lower
- upper
- add DSState_loadModule api
- improve error handling of DSState_loadAndEval
- rewrite RC file loading
- fix race condition
- improve error message
- experimental LSP server (early stage)
- fix '--version' option output. no longer show copyright year
- set exit status to 1, when throw exception
- when press CTRL-D, call 'exit'
- not restore exit status when unwinding within signal handler
- no longer change debug logging policy at runtime
- change DSError definition
- 'else' keyword is not allowed as command name
- no longer need expect command
- map literal behavior
- exit status
- module loading order
- fix TOCTOU race condition of RC file loading
- error handling of invalid module file loading
- stdin restoring in last pipe
- toplevel printing of last pipe
- error line printing
- stabilize module system
- node/byte code dumper correctly work when use source statement
- correctly work at all execution modes
- module aware error reporting
- search system config dir and local config dir
- builtin read command can accept /dev/fd/* style description (when use -u option)
- builtin test command can accept /dev/fd/* style description (when use -t option)
- support process substitution
- introduce config dir
- ${CMAKE_INSTALL_PREFIX}/etc/ydsh
- ~/.ydsh
- introduce
libydsh
atexit
module- now set multiple termination handler
- improve assertion messages of interactive test cases
- drop support D-Bus related features
- D-Bus object type
- Proxy object type
- ObjectPath type
- Variant type
- interface loading
- type inheritance of some type (due to remove Variant type)
- status-log format
- RC file loading
- now use module system
- public api
- DSError maintains error source name
- DSState_loadAndEval interface
- introduce DS_ERROR_KIND_FILE
- DSState_setScriptDir behavior
- simple command in last pipeline is evaluated in subshell
- no longer ignore SIGPIPE by default
- UnixFD object handling
- string representation
- iohere no longer accepts UnixFD object
- string concatenation is not allowed in command arguments
- replace git submodule with cmake-external project
- google test
- re2c
- no longer need
libxml2
,libdbus
- stack reservation of user-defined command
- current working directory handling
- TOCTOU race condition in script loading
- type checking of break expression
- reactivate history saving when exit/assert
- builtin fg/bg command (only available when job control is enabled)
- stabilize job control
- in interactive mode, propagate received SIGHUP to managed jobs
- in interactive mode, when call builtin exit, send SIGHUP to managed jobs
- try expression
- user-defined termination handler (TERM_HOOK)
- exit (also script end)
- uncaught exception
- assertion failure
- experimental module system support
- change debug logging policy at runtime
- when specified '-e' option, '--trace-exit' option does not affect
- not maintain pending signal order (replace pending signal queue with bitset)
- builtin kill command sends signal to process group
- remove termination hook from public api
- Signals api
- typing rule of if expression
- AST dump format (remove RootNode)
- public api
- DSCandidates interface
- use '!' for unary not op
- scripts containing null characters are now not acceptable
- change Job type method
- remove suspend/resume method
- remove boolean operator
- change return type of wait method
- rename kill with raise
- add poll method
- method lookup mechanism
- stack overflow detection
- introduce separate control stack and check depth of control stack
- job control signal (SIGCONT, SIGTTIN, etc) handling
- EOS token position
- line marker of method call, self assignment, indexer
- builtin set_env/unset_env
- UnixFD object
- dup/close
- constructor (file open)
- redirection target
- Unified pipeline
- expression in pipelines
- Nothing type
- Asynchronous execution (experimental)
- background job
- disowned background job
- co-process
- Job type
- for asynchronous execution
- some control method
- wait
- suspend
- resume
- kill
- detach
- etc..
- basic job-control feature (experimental)
- job-table
- builtin kill
- throw exception when access environmental variable (after unset_env)
- prompt string interpretation behavior
- not import
OLDPWD
/PWD
by default - allow void cast
- public api
- type alias syntax (now use alias keyword)
- forbid redefinition of builtin exec command
- user-defined/builtin commands in last pipe are executed in parent shell (due to unified pipeline)
- operator precedence of throw expression
- temporary disable history save when terminated by exit or assert
- cannot change SIGCHLD handler
- build error when specified _FORTIFY_SOURCE=2 (now use this option by default)
- code generation of block node (reclaim local)
- mix of io buffer when fork-capture
- exit status handling (when terminated by signal)
- line marker
- invalid UTF-8 byte sequence handling
- lexer mode stack
- infinite for-loop
- type checking of command substitution
- builtin command help message
- support single element tuple literal
- support null coalescing operator for option type
- block expression
- if expression
- expression with io redirection
- support signal handling (except for posix real-time signal)
- loop expression(for, for-in. while, do-while)
- break statement return value
- put comma in last element of array and map literal
- reactivate LLVM fuzz target
- default value of exit command
- disallow magic method invocation
- public api
- remove constructor of single element tuple type
- ternary expression has void expression
- if, do-while, while, for, try, block statement parsing
- bit operator syntax
- "-and" -> "and"
- "-or" -> "or"
- "-xor" -> "xor"
- array/map method
- rename "find" to "get"
- return value of "put"
- "default" method to map
- toplevel-printing of option value
- regex api
- remove "search" method
- add "=~" / "!~" operator
- builtin exit command is Bottom type
- PID, PPID type (Uint32 -> Int32)
- type checking of is expression
- home/end key in putty
- SEGV in interactive mode
- new expression
- '!=' and '!~' operator parsing when left hand-side is a type expression
- multiple return type parsing
- stack overflow of parser
- memory leak of type coercion
- linenoise use history api
- support history command
- add SCRIPT_DIR
- add regex type and regex literal
- add option type and unwrap operator
- reactivate ternary expression
- ensure destructor call of local variable when out of scope
- support here string
- cleanup redundant code
- rewrite pipeline evaluation api for supporting unified-pipeline syntax
- do-while condition is out of scope
- do not propagate SystemError from pipeline
- user-defined command is executed in parent shell
- tilde expansion behavior
- node dumper format
- some string api (use option type)
- stacktrace element
- control flow of nested try-catch
- invalid option handling of read and cd command
- add experimental history api
- add abbreviated type notation for array, map and tuple types
- improve builtin read command
- improve command line option handling of builtin command
- add basic debug api
- cleanup and stabilize the interpreter
- improve null character handling of string api
- update google test to 1.8
- support the following builtin variable
RANDOM
SECONDS
HISTCMD
,HISTFILE
,HISTSIZE
,HISTFILESIZE
MACHTYPE
UID
,EUID
,PID
,PPID
- improve error line number
- reactivate waitSignal method
- change naming convention of public api
- remove ADD method from string
- backslash handling in double-quoted string
- drop support ternary expression
- drop support print expression
- string self assignment
- builtin cd command
- completer
- undefined behavior of illegal iterator usage
- line marker of EOS token
- replace AST interpreter with byte code interpreter
- omit parenthesis from assert, if, while, do-while, catch statement
- change throw statement to expression
- support ternary expression
- cd and pwd command support -L and -P option
- hex and octal number
- temporary disable waitSignal method (due to some issue)
- for-in statement syntax
- follow symbolic link when complete file name
- break and continue statement in finally block
- correctly handle stack overflow
- improve semantic error message (now show error line marker)
- replace
editline
tolinenoise
- add some built-in variable (
OSTYPE
,YDSH_VERSION
,REPLY
,reply
,IFS
) - support positional parameter ($1, $2, ...
$9, $ #) - add special character
$$
(for indicating parent process pid) - add built-in test command
- add built-in read command (only support basic feature)
- specifying a separator of internal field splitting (use
IFS
) - escaped string literal supports octal or hex number
- cache full path of command name (also support hash command)
- support basic input completion
- public api
- change logical operator syntax (&, |, ^) to (-and, -or, -xor)
- ignore empty string value of String Array object when performing parameter expansion
- allow subscript operator when performing parameter expansion
- unary operator type
- built-in eval command invokes user-defined command
- UTF-8 handling
- infinite loop of binary expression parsing
- command name syntax
- exec_test runner
- segmentation fault when having circular reference (now raise StackOverflowError)
- suffix operator
- integer cast
- environmental variable handling
- add some string api(count, slice, indexOf, startsWith, ...etc.)
- prompt string interpretation(PS1/PS2)
- add some built-in command (command, eval, exec, pwd)
- user-defined command
- add some float api(isNan, isFinite)
- block statement
- add debug function(checked-cast, logging)
- import-env/export-env(default value or exception raising)
- string literal definition
- map literal syntax
- remove back-quote literal
- float zero-division behavior
- coercion
- try-catch behavior
- unreachable code detection
- parameter expansion of Any object
- function call
- assert or exit