WSL/SLF GitLab Repository

Skip to content

Finer-grained handling of special expressions in text and number fields

Currently when a special expression is provided (such as ${env:xxx} or ${{xxx}}), the syntax is checked and at the same time the expression is evaluated. If the syntax does not validate or the expression can not be validate, it returns the same message (wrong syntax). Since environment variables that are referred to might not exist in the environment Inishell is running from, this will wrongly show the user that the expression is not valid...

Therefore, we need a more fine grained approach:

  • a check for syntax, with an invalid syntax error and symbol if necessary;
  • a check for expression evaluation with a less threatening symbol if the expression could not be validated (which is a valuable information but not the end of the world)
  • and a symbol if the expression is syntactically correct and could be validated

The code is all between main/expressions.cc, panels/Number.cc and panels/Textfield.cc