[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Bash Config

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 10
Thread images: 2

File: bash-logo-web.png (14KB, 376x158px) Image search: [Google]
bash-logo-web.png
14KB, 376x158px
Post your bash configs
>>
Pretty basic
>>
>>56620603
Mine is, like, 30 files and is pretty dang fancy. It even has a mode that loads everything into a ram disk, for when I was on a really shitty old computer with a failing drive.
>>
https://bpaste.net/show/1c77ee6c283e
>>
>>56620603

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

# ibus is used for QT input. Basically, Ctrl-Shift-U to
# enter unicode characters in FocusWriter.
export QT_IM_MODULE=ibus

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

#my listen key for di.fm (get a new one at di.fm/trial, then go to player settings)
DI_FM_LISTEN_KEY='aebc083223fb8f34c7603847'

#my aliases
alias sshp='ssh [email protected]'
alias gsalad='mplayer -playlist http://www.somafm.com/groovesalad.pls'
alias ghop="mplayer http://prem1.di.fm:80/glitchhop?$DI_FM_LISTEN_KEY"
alias scr='scrot /tmp/scrot.png'
alias scrs='scrot -s /tmp/scrot.png'
alias pgoog='ping www.google.co.uk'
alias ciw='ciphwrap -v -k ~/syncfiles/Private/Cipher/key'
alias cip='cipher -k ~/syncfiles/Private/Cipher/key'
alias cid='cipher -d -k ~/syncfiles/Private/Cipher/key'
alias aud='cd /home/ethan/ && .scripts/audition.sh -a aud/ -f ghc/ -c "mplayer -msglevel all=0:statusline=5 -nolirc" -r 5 -s'

#cl function, changes to dir and lists contents
cl() {
local dir="$1"
local dir="${dir:=$HOME}"
if [[ -d "$dir" ]]; then
cd "$dir" > /dev/null; ls
else
echo "bash: cl: $dir: Directory not found"
fi
}

#provides the ranger-cd function
source /usr/share/doc/ranger/examples/bash_automatic_cd.sh


Last four aliases are for programs/scripts I wrote myself. In order: encrypt a file, decrypt a file, decrypt a file for the duration of one command, and a script that runs files through a command and asks me to each one 1 to 5, then puts them in folders accordingly. I'm using it to work through a big folder of music that I downloaded.
>>
>>56620917
bash really has some fucked up syntax
>[[ $- != *i* ]] && return

jesus fuck
>>
>>56620603
Nice try FBI. You G-men are making a lot of these kinds of threads tonight I see.
>>
>>56620917
Have you considered
>[[ -f ~/.bash_aliases ]] && . ~/.bash_aliases
And putting all your aliases in there?

That's what I do and it really helps organise thing and keep the .bashrc readable.
>>
>>56621731
I use
[ -z "$PS1" ] && return
>>
>error field too long
https://github.com/Lolzen/dotfiles/blob/master/home/.bashrc
Thread posts: 10
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

If you need a post removed click on it's [Report] button and follow the instruction.
If you like this website please support us by donating with Bitcoin at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties. Posts and uploaded images are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that website. If you need information about a Poster - contact 4chan. This project is not affiliated in any way with 4chan.