Search code examples
shellfish

How to define constants in fish?


In sh:

readonly constant=value

How to do it in fish?


Solution

  • You cannot define read-only variables (constants) in fish. Only certain built-in environmental variables are read-only.

    These read-only variables are: status, history, version, _, LINES, COLUMNS and PWD. Only root can modify HOME and USER.