From 6446b4f793bd55d98902f6e51b144b0c089626c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Fernandes?= Date: Sat, 10 Feb 2024 19:03:16 +0100 Subject: [PATCH] docs: Fix Shell Login Example --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5a0afd8..35163b6 100644 --- a/README.md +++ b/README.md @@ -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: