Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetb authored Jan 11, 2018
1 parent bae2e85 commit fbeff1c
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,6 @@
This repository contains [a script](generate_aliases.py) to generate hundreds of
convenient kubectl aliases programmatically.

You can directly download the [`.kubectl_aliases` file](https://rawgit.com/ahmetb/kubectl-alias/master/.kubectl_aliases)
and save it in your $HOME directory, then edit your .bashrc/.zshrc file with:

```sh
[ -f ~/.kubectl_aliases ] && source ~/.kubectl_aliases
```

If you want full aliases to be printed to the screen before running them,
add the following line there as well:

```sh
func kubectl(){ echo "+ kubectl $@"; command kubectl $@ }
```


### Examples

Some of the 800 generated aliases are:
Expand Down Expand Up @@ -45,6 +30,22 @@ alias kgwf='kubectl get --watch -f'

See [the full list](.kubectl_aliases).

### Installation

You can directly download the [`.kubectl_aliases` file](https://rawgit.com/ahmetb/kubectl-alias/master/.kubectl_aliases)
and save it in your $HOME directory, then edit your .bashrc/.zshrc file with:

```sh
[ -f ~/.kubectl_aliases ] && source ~/.kubectl_aliases
```

**Print the full command before running it:** Add this to your `.bashrc` or
`.zshrc` file:

```sh
func kubectl(){ echo "+ kubectl $@"; command kubectl $@ }
```

### Syntax explanation

* **`k`**=`kubectl`
Expand All @@ -68,7 +69,7 @@ See [the full list](.kubectl_aliases).
* value flags (should be at the end):
* **`f`**=`-f/--filename`
* **`l`**=`-l/--selector`

### FAQ

**Does this not slow down my shell start up?** Sourcing the file that contains
Expand Down

0 comments on commit fbeff1c

Please sign in to comment.