* Grabbed a list of resources with the cmd:
kubectl api-resources -o name | xargs '-I{}' -n 1 echo -n '{}|'
* Removed plural endings for resources
(this matches the format of the clusters I interact with)
Note: I would like to add an optional "match an optional s" to handle
cases where the resources are pluralized, although I *think*
the way kubernetes names resources, they don't appear as plural
when doing `kubectl get all` which is what the hinting is designed
for. But I'm not super experienced with awk so I haven't figured
that one out yet.
The sha1 commit ids displayed by git may range in size and are not strictly 7 digits or 40 digits. In practice, the old default was something like 7, and that was enough to uniquely distinguish the commit. However, some repositories (Upstream Linux kernel) now use 12 as the default.
When we support intervals, use them to specify the full range to make the hint grab all available characters.
This patch fixes the regular expression that parses `fingers-pattern-N`
settings, allowing the `N` number to contain either one or more digits.
Before this patch:
$ (echo '@fingers-pattern-0 "git rebase --(abort|continue)"'; echo '@fingers-pattern-1 "yolo"'; echo '@fingers-pattern-50 "whatever"') | grep '^@fingers-pattern' | sed 's/^@fingers-pattern-[0-9] "\(.*\)"$/(\1)/'
(git rebase --(abort|continue))
(yolo)
@fingers-pattern-50 "whatever"
After this patch:
$ (echo '@fingers-pattern-0 "git rebase --(abort|continue)"'; echo '@fingers-pattern-1 "yolo"'; echo '@fingers-pattern-50 "whatever"') | sed -n 's/^@fingers-pattern-[0-9]\{1,\} "\(.*\)"$/(\1)/p'
(git rebase --(abort|continue))
(yolo)
(whatever)