Skip to content

Commit

Permalink
fixed installation to use brew
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverisaac committed Jan 19, 2022
1 parent fca91e8 commit 0679190
Showing 1 changed file with 42 additions and 40 deletions.
82 changes: 42 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down Expand Up @@ -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
```

0 comments on commit 0679190

Please sign in to comment.