Skip to content

Instantly share code, notes, and snippets.

@alexlovelltroy
Last active April 23, 2024 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexlovelltroy/70af48b195bec4f9c7d0faaa9dd217b3 to your computer and use it in GitHub Desktop.
Save alexlovelltroy/70af48b195bec4f9c7d0faaa9dd217b3 to your computer and use it in GitHub Desktop.
Protable dotfiles
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# add go path
export PATH="/usr/local/go/bin:${GOPATH}/bin:${PATH}"
# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
. "$rc"
fi
done
fi
unset rc
# Set some basic helpful options
# Update the window size after each command
shopt -s checkwinsize
# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob
# Append to the Bash history file, rather than overwriting it
shopt -s histappend
# Autocorrect typos in path names when using `cd`
shopt -s cdspell
install_starship() {
curl -sS https://starship.rs/install.sh | sh
mkdir -p ~/.config && touch ~/.config/starship.toml
starship preset bracketed-segments -o ~/.config/starship.toml
}
install_ssh_keys() {
curl -fSsL https://github.com/alexlovelltroy.keys >> ~/.ssh/authorized_keys
}
install_zellij() {
bash <(curl -L zellij.dev/launch)
sudo cp /tmp/zellij/bootstrap/zellij /usr/local/bin/zellij
}
# This is the prompt. It should be last
eval "$(starship init bash)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment