mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-05 21:07:52 +00:00
docs(kubernetes): Remove extra backspace from regex in example (#4905)
Remove extra backspace from regex in example In the example, `[\\w-]` would match a literal backspace `\`, the character `w` or a dash `-`. By removing the backspace, instead it matches any "word character" `\w` or a dash `-`.
This commit is contained in:
parent
61b01dacd7
commit
c8bb1bae8d
@ -2456,7 +2456,7 @@ disabled = false
|
||||
[kubernetes.context_aliases]
|
||||
'dev.local.cluster.k8s' = 'dev'
|
||||
'.*/openshift-cluster/.*' = 'openshift'
|
||||
'gke_.*_(?P<var_cluster>[\\w-]+)' = 'gke-$var_cluster'
|
||||
'gke_.*_(?P<var_cluster>[\w-]+)' = 'gke-$var_cluster'
|
||||
[kubernetes.user_aliases]
|
||||
'dev.local.cluster.k8s' = 'dev'
|
||||
'root/.*' = 'root'
|
||||
@ -2489,12 +2489,12 @@ and shortened using regular expressions:
|
||||
# OpenShift contexts carry the namespace and user in the kube context: `namespace/name/user`:
|
||||
'.*/openshift-cluster/.*' = 'openshift'
|
||||
# Or better, to rename every OpenShift cluster at once:
|
||||
'.*/(?P<var_cluster>[\\w-]+)/.*' = '$var_cluster'
|
||||
'.*/(?P<var_cluster>[\w-]+)/.*' = '$var_cluster'
|
||||
|
||||
# Contexts from GKE, AWS and other cloud providers usually carry additional information, like the region/zone.
|
||||
# The following entry matches on the GKE format (`gke_projectname_zone_cluster-name`)
|
||||
# and renames every matching kube context into a more readable format (`gke-cluster-name`):
|
||||
'gke_.*_(?P<var_cluster>[\\w-]+)' = 'gke-$var_cluster'
|
||||
'gke_.*_(?P<var_cluster>[\w-]+)' = 'gke-$var_cluster'
|
||||
```
|
||||
|
||||
## Line Break
|
||||
|
Loading…
Reference in New Issue
Block a user