Why Sponsor Oils? | source | all docs for version 0.19.0 | all versions | oilshell.org
Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.
This chapter in the Oils Reference describes YSH types and methods.
Respects unicode space.
Respects unicode space.
Respects unicode space.
Respects unicode.
Respects unicode.
A Place is used as an "out param" by calling setValue():
proc p (out) {
call out->setValue('hi')
}
var x
p (&x)
echo x=$x # => x=hi
Like the eval
builtin, but useful in pure functions.
Like $()
, but useful in pure functions.
An API the wraps the $PS1
language. For example, to simulate PS1='\w\$ '
:
func renderPrompt(io) {
var parts = []
call parts->append(io->promptval('w')) # pass 'w' for \w
call parts->append(io->promptval('$')) # pass '$' for \$
call parts->append(' ')
return (join(parts))
}
TODO: Depends on system clock.
TODO: Like the awk function, this takes an timestamp directly.
In other words, it calls C localtime() (which depends on the time zone database), and then C strftime().
TODO: The free function glob() actually does I/O. Although maybe it doesn't fail?