-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fca91e8
commit 0679190
Showing
1 changed file
with
42 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected]: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 | ||
``` |