diff --git a/README.md b/README.md index e7a3d54..722c040 100644 --- a/README.md +++ b/README.md @@ -5,44 +5,6 @@ This repo has a tool which does two things: 1. Handle clicks from iterm 2. Generate files which the iterm click-handler can understand -# Configuration - - -### `ITERM_CMD_DIR` - -Sets where the files are created. This defaults to `${TMPDIR}/it2cmd` but can be set to any directory. -**I would suggest setting `ITERM_CMD_DIR=/tmp/it2cmd`** - - -### `ITERM_CMD_LS_AFTER_CD` - -The iterm-cmd click handler will, by default, execute an `ls` after you click on a directory. Set this to `false` to disable. - - -### `ITERM_CMD_PRINT_EASY_NAV` - -The iterm-cmd click handler will, by default, print out a click-map for you to quickly navigate. Something like: - -``` -< /path/to/previous/location ^ /path/to/parent/directory -``` - -Set this to `false` to disable - - -### `ITERM_CMD_ENABLED` - -This is not a direct configuration option, but this is the environment variable you should use in a script to tell if a user would like to print out iterm-cmd paths. Something like this: - -```bash -kubectl get pods -o name | while read podname; do - output="$podname" - if [[ ${ITERM_CMD_ENABLED:-false} == true ]]; then - output="$podname $( iterm-cmd kubectl get pod $podname -o yaml )" - fi - echo "$output" -done -``` # Installation @@ -57,8 +19,8 @@ git clone git@github.com:oliverisaac/iterm-cmd.git "$GOPATH"/src/github.com/oliv ### 2. Build and install `iterm-cmd` ``` -cd "$GOPATH"/src/github.com/oliverisaac/iterm-cmd -go install . +brew tap oliverisaac/tap +brew install oliverisaac/tap/iterm-cmd ``` ### 3. Edit your iTerm2 Settings to use the click handling functionality: @@ -99,3 +61,43 @@ iterm-cmd echo "Hello world" ``` Then `cmd-click` on the output filename. + + +# Configuration + + +### `ITERM_CMD_DIR` + +Sets where the files are created. This defaults to `${TMPDIR}/it2cmd` but can be set to any directory. +**I would suggest setting `ITERM_CMD_DIR=/tmp/it2cmd`** + + +### `ITERM_CMD_LS_AFTER_CD` + +The iterm-cmd click handler will, by default, execute an `ls` after you click on a directory. Set this to `false` to disable. + + +### `ITERM_CMD_PRINT_EASY_NAV` + +The iterm-cmd click handler will, by default, print out a click-map for you to quickly navigate. Something like: + +``` +< /path/to/previous/location ^ /path/to/parent/directory +``` + +Set this to `false` to disable + + +### `ITERM_CMD_ENABLED` + +This is not a direct configuration option, but this is the environment variable you should use in a script to tell if a user would like to print out iterm-cmd paths. Something like this: + +```bash +kubectl get pods -o name | while read podname; do + output="$podname" + if [[ ${ITERM_CMD_ENABLED:-false} == true ]]; then + output="$podname $( iterm-cmd kubectl get pod $podname -o yaml )" + fi + echo "$output" +done +```