diff --git a/README.md b/README.md index ccbfe7f..04c3e70 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Add the following to your `.bashrc/.zshrc` file: `.zshrc` file: ```sh -function kubectl() { echo "+ kubectl $@">&2; command kubectl $@; } +function kubectl() { echo "+ kubectl $@" >&2; command kubectl $@; } ``` #### Fish @@ -83,31 +83,35 @@ instead of aliases, so that pressing space shows the full command before executi ### Syntax explanation -* **`k`**=`kubectl` - * **`sys`**=`--namespace kube-system` +* **`k`**: `kubectl` + * **`sys`**: `--namespace kube-system` * commands: - * **`g`**=`get` - * **`d`**=`describe` - * **`rm`**=`delete` - * **`a`**:`apply -f` - * **`ak`**:`apply -k` - * **`k`**:`kustomize` + * **`g`**: `get` + * **`d`**: `describe` + * **`rm`**: `delete` + * **`a`**: `apply -f` + * **`ak`**: `apply -k` + * **`k`**: `kustomize` * **`ex`**: `exec -i -t` * **`lo`**: `logs -f` -* resources: - * **`po`**=pod, **`dep`**=`deployment`, **`ing`**=`ingress`, - **`svc`**=`service`, **`cm`**=`configmap`, **`sec`**=`secret`, - **`ns`**=`namespace`, **`no`**=`node` - **:warning: Please do not suggest new resources here, instead fork the project.** +* resources: **:warning: Please do not suggest new resources here, instead fork the project.** + * **`po`**: `pod` + * **`dep`**: `deployment` + * **`ing`**: `ingress` + * **`svc`**: `service` + * **`cm`**: `configmap` + * **`sec`**: `secret` + * **`ns`**: `namespace` + * **`no`**: `node` * flags: * output format: **`oyaml`**, **`ojson`**, **`owide`** * **`all`**: `--all` or `--all-namespaces` depending on the command * **`sl`**: `--show-labels` - * **`w`**=`-w/--watch` + * **`w`**: `-w/--watch` * value flags (should be at the end): - * **`n`**=`-n/--namespace` - * **`f`**=`-f/--filename` - * **`l`**=`-l/--selector` + * **`n`**: `-n/--namespace` + * **`f`**: `-f/--filename` + * **`l`**: `-l/--selector` ### Running the script @@ -125,7 +129,7 @@ python generate_aliases.py fish > .kubectl_aliases.fish - **Doesn't this slow down my shell start up?** Sourcing the file that contains ~500 aliases takes about 30-45 milliseconds in my shell (zsh). I don't think -it's a big deal for me. Measure it with `echo $(($(date +%s%N)/1000000))` +it's a big deal for me. Measure it with `echo $(($(date '+%s%N') / 1000000))` command yourself in your .bashrc/.zshrc. - **Can I add more Kubernetes resource types to this?** Please consider forking