Skip to content

Repository files navigation

bashrc

Supported in many environments!

CentOS 7 CentOS 7 Build Status

CentOS 8 CentOS 8 Build Status

Ubuntu 18 Ubuntu 18 Build Status

This is a collection of all of my favorite customizations for bash and zsh.

Installation

git clone https://github.com/maludwig/bashrc
./bashrc/install

Customization

After the bashrc extensions are loaded, the final step is to look at ~/profile.d/ for files that end in .sh, and source each file. See 50_sample.sh for an example.

User Experience

log-8601 "Launching example"
ask "Enter your username"
msg-info "Your username is '$ASK'"
ask-password "Enter your password secretly"
msg-dry "Your password is '$ASK'"
ask-yes "Are you sure?"if [[ "$ASK"=="y" ]];then
msg-success "You said yes"else
msg-error "You said no"fi
ask-enter "Continue?"
md /tmp/new_dir
msg-info "You are already in: $PWD"~/profile.d
msg-info "You don't need to 'cd' anymore"
ll
cat 50_sample.sh
msg-info "Edit 50_sample.sh to try out extra customizations"
j tm w_d
msg-info "You jumped back to $PWD, you can only jump to places you have already been"
j file.d
msg-info "You jumped back to $PWD, you can only jump to places you have already been"
msg-info "Show the first column"echo"FIRST LASTone twogold silver"| awk1
msg-error "$(echo 'why are you yelling?'| upper)"
msg-success "$(echo 'SILENCE IS GOLDEN'| lower)"
log-8601-local "Customize your experience"
PS1="${CGREEN}\u@\H:${CDEFAULT}"'${PWD}\n\$ 'echo -e "Show the git branch name in ${CYELLOW}yellow${CDEFAULT}"
ps1_add_fn git-branch-name YELLOW ''''echo -e "Show the UTC ISO-8601 timestamp in ${CGREEN}yellow${CDEFAULT}"
ps1_add_fn date-8601 GREEN
echo -e "Show the local time ISO-8601 timestamp in ${CCYAN}cyan${CDEFAULT}"
ps1_add_fn date-8601-local CYAN
echo -e "${CRED}Ra${CYELLOW}in${CGREEN}bo${CCYAN}w ${CBLUE}wa${CCYAN}it${CDEFAULT}"forXin {1..9};do rainbow-sleep 0.5;done
msg-info "Test TCP ports"
testport google.com 443
msg-info "Make a good SSH key"
generate-ssh-key

About

Mitchell's bashrc configuration

Resources

Stars

4 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages