Let's have a comfy .bashrc thread. I'll start with a couple neat ones

let's have a comfy .bashrc thread. I'll start with a couple neat ones

alias trash="rm -r .local/share/Trash/*"

alias cfi3="vim ~/.config/i3/config"

Attached: tumblr_o48vz37IPr1v0pigno1_1280.png (600x579, 271K)

alias ls="echo benis"

>newfag just learned about aliases

>newfag not contributing

open the vim configoroni ;)))) based comfy

>gets mad that i use aliases
>still doesn't contribute anything

Attached: 1519102718407.jpg (725x712, 74K)

>learning things about linux is bad

while sleep 60; do
pacman -Syu
done &

>bash
>linux
Fucking brainlet

extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "don't know how to extract '$1'..." ;;
esac
else
echo "'$1' is not a valid file!"
fi
}

Why not use while + shift to loop over all input arguments? Then you could specify several archives at once. Also shouldn't you quote $1 to avoid word splitting?

bsdtar xvf *.tar.gz
bsdtar xvf *.zip
bsdtar xvf *.rar

>.local/share/Trash/
Please tell me you actually don’t have a folder like this!

came default like that with my distro. What's the problem?

>bsdtar

Attached: 1561447377248.jpg (640x425, 64K)

Just terrible linoks decisions, nothing else.
Why don’t you go home, white man?

He's trolling.

Linux has nothing to do with the trash system, retard.

alias cl="clear"
alias cls="clear && ls"
alias flex="neofetch && clear"

>tar xzvf
XTRACT ZE VUCKING FILE

Attached: BrZvWSOCAAE7Unk.jpg (599x337, 28K)

*clear && neofetch
also
alias sp="sudo pacman"

bash search history like in zsh
if [[ $- == *i* ]]
then
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
fi

one tar to rule them all

From the previous thread:
alias bi="vi"
alias bim="vim"

Attached: 1560634676828.jpg (923x519, 67K)

uhh .inputrc much?

GNU tar is miles ahead

This must be bait.

Oh, go to the hell, but don’t white knight the gnu retards.

Retard

Explain.

I use it. am i a retard? why do you think it's bait?

Try CTRL+L.

.....thank you, fren

Run bind -p for a shortcut list. Some are very useful.

# dynamic window title
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD/#$HOME/\~} - $TERM\a"'

# bash-completion
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
. /usr/share/bash-completion/bash_completion

shopt -s histappend

# Check the window size after each command, and update LINES and COLUMNS if the size has changed
shopt -s checkwinsize

# alias
alias sudo="sudo "
alias python="python3"
alias httpserver="ip addr show eno1 | grep -o 'inet [^/]*' && python3 -m http.server 8024"
alias vi="/usr/bin/nvim"
alias vim="/usr/bin/nvim"
alias ovim="/usr/bin/vim"
alias ncmpcpp="/usr/bin/ncmpcpp"
alias lua="lua5.3"
alias yt="youtube-dl --restrict-filenames"
alias yta="youtube-dl -x --restrict-filenames"
alias ytmp3="youtube-dl -x --restrict-filenames --audio-format mp3"
alias htop="htop -C"
alias tm="tmux new-session -A -s default /bin/bash"
alias mv="mv -i"

# pacman
alias S="sudo pacman -S" # install
alias Ss="sudo pacman -Ss" # search repo
alias Rs="sudo pacman -Rs" # remove
alias Syu="sudo pacman -Syu; sudo pacman -Sc --noconfirm" # update
alias Qs="sudo pacman -Qs" # search installed
alias Ql="sudo pacman -Ql" # search installed files by package
alias Sc="sudo pacman -Sc --noconfirm" # clean old cache

alias pikaS="pikaur -S" # install
alias pikaSs="pikaur -Ss" # search repo
alias pikaSyu="pikaur -Syu" # update

# colors
alias ls="ls --color=auto --group-directories-first -hX"
alias grep='grep --color=auto'

reddit
I have a similar thing but for busybox vi instead
alias "bvi=busybox vi"
alias "wine32=WINEPREFIX=/root/.wine32/ strat void wine"
alias "wine32cfg=WINEPREFIX=/root/.wine32/ strat void winecfg"
alias "np=wine64 /root/.wine/drive_c/Program\ Files/notepad++/notepad++.exe"
alias "suspend=echo mem > /sys/power/state"

# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi


# Put your fun stuff here.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi

I'm pirating the http server alias, thanks for passing by my ship.

there is a single file script that open http server in python and allow uploading files as well

Always liked this one
alias mpv-ascii="mpv --msg-level=all=no --vo=caca"
Enjoy.

Try tct, it uses block characters.

man you're dipshit

I'm surprised nobody posted fortune/coway porn:
cowsay -f `ls /usr/share/cowsay |shuf -n1|cut -d'.' -f1` "`fortune -s`"

Attached: cowsay_porn.png (591x654, 24K)