Created
June 16, 2021 15:19
-
-
Save jdlangs/9c82ac383888e12cc3c0d53aa2e04c98 to your computer and use it in GitHub Desktop.
AWS Robomaker .bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bashrc | |
export PATH=$PATH:$HOME/.local/bin:$HOME/bin | |
# load nvm | |
export NVM_DIR="$HOME/.nvm" | |
[ "$BASH_VERSION" ] && npm() { | |
# hack: avoid slow npm sanity check in nvm | |
if [ "$*" == "config get prefix" ]; then which node | sed "s/bin\/node//"; | |
else $(which npm) "$@"; fi | |
} | |
# [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
rvm_silence_path_mismatch_check_flag=1 # prevent rvm complaints that nvm is first in PATH | |
unset npm # end hack | |
# modifications needed only in interactive mode | |
if [ "$PS1" != "" ]; then | |
# Set default editor for git | |
git config --global core.editor /usr/bin/nano | |
# Turn on checkwinsize | |
shopt -s checkwinsize | |
# keep more history | |
shopt -s histappend | |
export HISTSIZE=100000 | |
export HISTFILESIZE=100000 | |
export PROMPT_COMMAND="history -a;" | |
# Cloud9 default prompt | |
_cloud9_prompt_user() { | |
if [ "$C9_USER" = root ]; then | |
echo "$USER" | |
else | |
echo "$C9_USER" | |
fi | |
} | |
_ros_prompt() { | |
if [ -n "$ROS_DISTRO" ]; then | |
echo " (ROS $ROS_DISTRO)" | |
fi | |
} | |
PS1='\[\033[01;32m\]$(_cloud9_prompt_user)\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(_ros_prompt)$(__git_ps1 " (%s)" 2>/dev/null) $ ' | |
fi | |
# Do not autosource a ROS distro | |
# [[ -e /opt/ros/foxy/setup.sh ]] && source /opt/ros/foxy/setup.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment