Module garden::syntax

source ·
Expand description

Command-line syntax conventions

Functions

  • Escape $variable into $$variable for evaluation by shellexpand.
  • Return the graft basename. “@foo::bar::baz” -> “foo”
  • Return true if string is a variable “replace” operation.
  • Return true if the string contains 0-9 digits only
  • Return true if string is an $ exec expression.
  • Return true if string is a :garden expression.
  • Return true if string ends in “.git”. This is used to detect bare repositories.
  • Return true if string is a graft::value expression.
  • Return true if string is a %group expression.
  • Return true if string is a variable “append” operation.
  • Return true if string is a @tree expression.
  • Split a string into pre and post-graft namespace string refs
  • Safely a string into pre and post-split references
  • Trim garden, group, and tree prefixes
  • Trim the “$ “ prefix from an exec expression
  • Remove the graft basename leaving the remainder of the graft string.
  • Trim “+” and “=” suffixes from strings.
  • Trim “+” and “=” suffixes in-place.