Skip to content

Commit

Permalink
docs: Fix Shell Login Example
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviof committed Feb 10, 2024
1 parent 2ed31cf commit 6446b4f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ path-helper -d

Evaluate `path-helper` output in order to export `PATH` and `MANPATH` environment variables. The following example checks if `path-helper` is present in default location, and later runs `eval` against:

```bash
[[ -x ${GOPATH}/bin/path-helper ]] &&
eval `${GOPATH}/bin/path-helper`
```sh
declare -r PATH_HELPER_BIN="/usr/local/bin/path-helper"

[[ -x "${PATH_HELPER_BIN}" ]] &&
eval "$(${PATH_HELPER_BIN})"
```

Running `path-helper` without `eval`, would print out the Shell script snippet it generateds. For instance:
Expand Down

0 comments on commit 6446b4f

Please sign in to comment.