From ffd93277615ec383ef09fe38299098fc0b34e29f Mon Sep 17 00:00:00 2001 From: nyxnor Date: Sat, 11 Sep 2021 08:10:37 +0200 Subject: [PATCH] POSIX compliant input path on any shell --- cli/README.md | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/cli/README.md b/cli/README.md index 00c175a7..a72bf348 100644 --- a/cli/README.md +++ b/cli/README.md @@ -59,28 +59,13 @@ pip install --user onionshare-cli #### Set path -When you install programs with pip and use the --user flag, it installs them into ~/.local/bin, which isn't in your path by default. To add ~/.local/bin to your path automatically for the next time you reopen the terminal or source your shell configuration file, do the following: +When you install programs with pip and use the `--user` flag, it installs them into *~/.local/bin*, which isn't in your path by default. To add *~/.local/bin* to your path automatically for the next time you reopen the terminal or source your shell configuration file, do the following: -First, discover what shell you are using: +Apply the path to your shell file: ```sh -echo $SHELL -``` - -Then apply the path to your shell file: - -bash: - -```sh -echo "PATH=\$PATH:~/.local/bin" >> ~/.bashrc -source ~/.bashrc -``` - -zsh: - -```sh -echo "PATH=\$PATH:~/.local/bin" >> ~/.zshrc -source ~/.zshrc +printf "PATH=\$PATH:~/.local/bin\n" >> ~/.${SHELL##*/}rc +source ~/.${SHELL##*/}rc ``` #### Usage