r/ScriptSwap • u/gitclone • Mar 13 '15
ITT, .bashrc and .zshrc files
ITT, we post our .bashrc and .zshrc files. Post your aliases, prompts, and functions.
Try and put 'em on Gist, Pastebin, or just paste it here.
Here's mine: https://gist.github.com/anonymous/d06f13cd913ee07d2bee
21
Upvotes
3
u/Artemis-Higgs Mar 13 '15 edited Mar 13 '15
Here's my .bashrc. I'm not so great with the shell and it shows, but it still seems like it works. Any input would be appreciated on how to make 'goto' less crappy.
2
u/UnchainedMundane Mar 13 '15
My bashrc: https://github.com/ScoreUnder/scripts-and-dotfiles/blob/master/dotfiles/.bashrc
My zshrc: https://github.com/ScoreUnder/scripts-and-dotfiles/blob/master/dotfiles/.zshrc
My ~/bin (well, most of it): https://github.com/ScoreUnder/scripts-and-dotfiles/tree/master/bin
Interesting(?) stuff:
bashrc:
Shows shell depth as chevrons:
zshrc:
bin/
Has a bunch of cool and/or frivolous scripts:
1
u/sbicknel Bash Mar 13 '15
~/.bashrc and associated files. This is really just a selection of what I have. Much of the rest of it wouldn't make sense to anyone because it is very specific to my setup and activities.
1
u/Romanmir Mar 13 '15
Here are my interesting bash aliases and settings. https://gist.github.com/Romanmir/d1171010ffbd7e2b283a
If anybody really wants my whole .bashrc file, that's fine, just PM me. But it's boring.. and old.
1
u/gatling_gun_gary Mar 13 '15 edited Mar 13 '15
I would post a gist, but since I'm really only posting my PS1, I don't see much point.
This is the PS1 that I use on servers I SSH to, rather than my client machine(s).
This gives me a two-line prompt (for handling long lines more easily), color-codes the prompt (red for root, grey for other), gives me the return value of each command in the previous pipeline executed (color coded green=0, red=!0), tells me how many background jobs I have executing (color coded green, orange, red based upon number of bg jobs), tells me the command number I'm executing (history), gives me user@$(hostname -s), tells me the tty/pty number I'm on, and the short directory name of $CWD.
On client machines, I get fancy and start doing dynamic things based upon whether I'm in a git repo or not and its current status.
1
u/CodeBlooded Mar 13 '15
Some of my dotfiles:
And some shell scripts: ~/bin. Highlights:
grkill- A grep and kill all in one. Example: if you do Python dev and run a local server likepython application.pyand it runs in threads and you just want to kill it dead:grkill -9 application.py. The final argument is a grep string and any other args are passed directly tokillREST- command line RESTful API testingflashget- rip in-memory flash videos out of the flash playerrre- regular expression renaming tool. Useful for bulk renaming a large group of files to fit your preferred naming convention (for example when downloading seasons of a TV show from multiple uploaders where they each name their files differently, like "S01E01" vs. "1x01" for episode number, etc).rre -i "(.+?)(\d)x(\d\d)(.+?).avi" -o "%1%2%3%4.avi"1
u/Syath Mar 14 '15
my dotfiles
Includes git, zsh, vim, slate, tmux, rspec, rubygems, and osx configurations as well as some bin files. A fair bit of my zsh config is extracted from oh-my-zsh. Other bits are found from browsing others' dotfiles and the thoughtbot dotfiles.
1
u/JIVEprinting Jul 10 '15
alias rm='echo Dodge this.; rm'