ela
Contents

The manual

Language

Commands, values, procs, jobs and errors. Each section is the text ela --spec prints for it.

ela is the scripting language of the ela shell, written in Odin. It replaces Bash and Python glue scripts.

  1. 01Keywords
  2. 02Goals
  3. 03Files and imports
  4. 04Statements and blocks
  5. 05Comments
  6. 06Layout
  7. 07Naming style
  8. 08Commandsecho prints any value
  9. 09VariablesThe environment · Constants
  10. 10TypesType and type_of · null
  11. 11Lists and mapsSorting a list · Indexes and slices
  12. 12Structs and enums
  13. 13ProcsTyped parameters and typed, named results · What a proc sees · Named and optional arguments
  14. 14Control flowswitch · Values from switch and if · Lists from for · defer
  15. 15withwith screen · time.block and time.each
  16. 16catchWhich lines a catch covers · catch signal · catch run · catch, try and defer
  17. 17Error handlingErrors as values · fail
  18. 18Error messages
  19. 19Pipes and capture
  20. 20The ? suffix
  21. 21StringsOne line · Several lines
  22. 22Process controlJobs · wait · Who waits · kill · run.max and $run.slot
  23. 23Signals
  24. 24Progress and spinners
  25. 25Arithmetic
  26. 26Strict rules
  27. 27Core built-insTotals, smallest and largest · Results are kept