Zsh behaves similar to Bash, however this behavior is configurable using the RC_QUOTES option.In the Bash shell, enclosing a string of characters in single quotes preserves the literal value of the characters within the single quotes. Most branch and tag names with special characters can be handled by including the name in single quotes, for example 'hello-$USER'. How to escape special characters in branch and tag names Similarly, if a branch name contains a semi-colon ( ), most shells interpret it as a command separator, so it needs to be quoted or escaped. If a branch name includes the $ character, then the shell must be stopped from expanding it as a variable reference. Most shells would interpret a valid branch name like hello-$USER as equivalent to the word "hello", followed by a hyphen, followed by the current value of the USER variable, rather than the literal string hello-$USER. To use these characters safely in a Git command, they must be quoted or escaped, otherwise the command may have unintended effects.įor example, the $ character is used by many shells to refer to a variable. When using a CLI, you might have situations where a branch or tag name contains special characters that have a special meaning for your shell environment. Why you need to escape special characters For more information, see " git-check-ref-format" in the Git documentation. Other than some exceptions - such as not starting or ending a name with a slash, or having consecutive slashes in the name - Git has very few restrictions on what characters may be used in branch and tag names. Both branch names and tag names may also use the path separator ( /) for structure, for example area/item or level-1/level-2/level-3. Tag names also usually follow a basic format, such as a version number like v1.2.3. Size, but with arbitrary data types.Most repositories use simple branch names, such as main or update-icons. In computer science, a tuple is a list-like collection of fixed Helm templates have a function to make thisĮasy: tuple. Sometimes it's useful to be able to quickly make a list inside of your template,Īnd then iterate over that list. Technique for embedding big blocks of data inside of your manifests, as The |- marker in YAML takes a multi-line string. To understand why this is the case, take a look at theįor us, though, this detail doesn't matter much. Why would we do this? Because the data in ConfigMapsĭata is composed of key/value pairs, where both the key and the value are So our list of toppings is actually not a YAML The toppings: |- line isĭeclaring a multi-line string. Now, in this example we've done something tricky. # Source: mychart/templates/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: edgy-dragonfly-configmap data: myvalue: "Hello World" drink: "coffee" food: "PIZZA" toppings: |- "Mushrooms" Using this syntax, we can modify our template to get rid of those new lines: Why? When the templateĮngine runs, it removes the contents inside of means Notice that we received a few empty lines in our YAML. # Source: mychart/templates/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: telling-chimp-configmap data: myvalue: "Hello World" drink: "coffee" food: "PIZZA" mug: "true" Permissions management for SQL storage backend.Chart Releaser Action to Automate GitHub Page Charts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |