Keeping in the spirit of "Whats in your inputrc and other similar threads"
$cat .bashrc
alias ls='ls --color=auto'
# enable bash completion in interactive shells
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
### Added by surfraw. To remove use surfraw-update-path -remove
export PATH=$PATH:/usr/lib/surfraw
### End surfraw addition.
The surfraw part allows you to type google foo or any other elvi without having to type sr or surfraw first.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
What's in your /home/.bashrc
- craigevil
- Posts: 5391
- Joined: 2006-09-17 03:17
- Location: heaven
- Has thanked: 28 times
- Been thanked: 39 times
What's in your /home/.bashrc
Raspberry PI 400 Distro: Raspberry Pi OS Base: Debian Sid Kernel: 5.15.69-v8+ aarch64 DE: MATE Ram 4GB
Debian - "If you can't apt install something, it isn't useful or doesn't exist"
My Giant Sources.list
Debian - "If you can't apt install something, it isn't useful or doesn't exist"
My Giant Sources.list
Re: What's in your /home/.bashrc
Found this some time ago. I always paste it at the end of /root/.bashrc so the root prompt is a distinct color (red here) instead of the standard green in my home .bashrc
Not rocket science, but it makes me think before executing commands as root.
Not rocket science, but it makes me think before executing commands as root.
Code: Select all
TERM_USER_HOST_COLOR='0;31m'
TERM_PATH_COLOR='0;31m'
TERM_PROMPT_COLOR='m'
TERM_USER_HOST='\u@\h'
TERM_PATH='\w'
TERM_PROMPT='\$'
export PS1=\
'\[\e['${TERM_USER_HOST_COLOR}'\]'${TERM_USER_HOST}'\[\e[m\]'\
' \[\e['${TERM_PATH_COLOR}'\]'${TERM_PATH}'\[\e[m\]'\
I wish for a conjugal visit and world peace. (Don't want to seem selfish.)
- Telemachus
- Posts: 4574
- Joined: 2006-12-25 15:53
- Been thanked: 2 times
Re: What's in your /home/.bashrc
It turns out that you can't delete a post.
Last edited by Telemachus on 2020-05-09 11:39, edited 1 time in total.
"We have not been faced with the need to satisfy someone else's requirements, and for this freedom we are grateful."
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System
Re: What's in your /home/.bashrc
I have a couple 'borrowed' from other sources:
# create a Terminal Calculator
function calc()
{
echo "${1}"|bc -l;
}
and
# decompress any file
function decom () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
Regards.
# create a Terminal Calculator
function calc()
{
echo "${1}"|bc -l;
}
and
# decompress any file
function decom () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
Regards.
Re: What's in your /home/.bashrc
Nice!
I just have:
in addition to the default gubbery.
I just have:
Code: Select all
alias x='startx /usr/bin/startxfce4'
alias xo='startx /usr/bin/openbox-session'
alias xf='startx /usr/bin/startfluxbox'