Browse Source

bash/init: Add ~/.cargo/bin in PATH

For Rust locally installed binaries (using Cargo), add ~/.cargo/bin at
the beginning of PATH variable.

Also move painted-shell/scripts directory to the beginning of PATH
(local paths first).

Signed-off-by: Cédric Marie <cedric@hjuvi.fr.eu.org>
main
Cédric Marie 6 months ago
parent
commit
7b944030a5
  1. 2
      README
  2. 10
      bash/init

2
README

@ -1,6 +1,6 @@
Painted Shell: A collection of colorful settings and scripts for Bash shell.
Written in 2013-2020 by Cédric Marie <cedric@hjuvi.fr.eu.org>
Written in 2013-2021 by Cédric Marie <cedric@hjuvi.fr.eu.org>
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain

10
bash/init

@ -4,7 +4,7 @@
# init - Configuration for bash
# This file is part of Painted Shell - Shell configuration and scripts.
#
# Written in 2013-2020 by Cédric Marie
# Written in 2013-2021 by Cédric Marie
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
@ -42,5 +42,11 @@ if [ "$TERM" != "" ]; then
PS1='\[\e[1;31m\]╭─\[\e[1;37;43m\]\t\[\e[0m\] \[\e[1;36;44m\]\w\[\e[0;32;40m\]$(__git_ps1)\[\e[0m\]\n\[\e[1;31m\]╰────────►\[\e[0m\] '
fi
fi
# Add the path to cargo binaries if not yet present
if ! [[ ":$PATH:" =~ ":$HOME/.cargo/bin:" ]]; then
PATH=$HOME/.cargo/bin:$PATH
fi
# Add the path to scripts if not yet present
echo $PATH | grep -q "$PAINTED_SHELL_PATH/scripts" || PATH=$PATH:$PAINTED_SHELL_PATH/scripts
if ! [[ ":$PATH:" =~ ":$PAINTED_SHELL_PATH/scripts:" ]]; then
PATH=$PAINTED_SHELL_PATH/scripts:$PATH
fi

Loading…
Cancel
Save