
Bashstrap – For your OS X terminal - barryclark
https://github.com/barryclark/bashstrap
======
krrrh
I remember spending so many happy hours customizing bash back in my early
years with unix. Now I'm older and wiser, and I just use fish.

[http://fishshell.com](http://fishshell.com)

I think that it should be especially appreciated by those who use OSX for its
"it just works" approach. A couple of pro tips:

* Instead of running chsh to change your default login shell just change the shell command for Terminal.app it iTerm. This means that scripts in cron etc will still run under bash and you won't break anything accidentally.

* Just like with zsh if you want to get customized there is something called oh-my-fish that helps a bit, but seriously you're 90% there with the defaults.

~~~
kika
Clicked on comments to say the same. When I discovered fish, I felt like
"where have I been". But there's one downside though: I got used (used as in
muscle reflexes) to things like ls -l `where something` and they do not work
anymore, fish is not backwards compatible with bash.

~~~
tsetse-fly
What's wrong with "ls -l (which cmd)"?

~~~
kika
Nothing wrong, but just a lack of muscle reflex. I've been using bash for
what, almost 20 years?

------
toupeira
Calling this "Bootstrap for Bash" is pretty disingenuous, all I can see are a
bunch of configuration files that are very basic and hard-coded to your own
usage.

------
clarry

      It cuts out the fluff
    

To me it looks like the exact opposite.

~~~
jpttsn
I had the same feeling. I already know my username, and if there's a directory
name before my prompt the "in" is implicit.

~~~
tekromancr
Do you know your username when you are using connected to a tmux over ssh that
may or may not have another, very similar, server running inside of a screen?

~~~
josso
Which is why you setup your shell (bash/zsh/fish) to check for the existence
of $SSH_CLIENT. If it exists, you can assume you're connecting via SSH and add
username and hostname to $PS1.

------
r4d2
This is just some fancied up bashrc.

A (much) better alternative would be to install zsh with oh-my-zsh
([https://github.com/robbyrussell/oh-my-
zsh](https://github.com/robbyrussell/oh-my-zsh)).

~~~
atmosx
zsh is broken and breaks X times per year. It's annoying, really. I'm tired of
wasting time configuring terminals time and again because the new version of
XYZ package is broken.

Anyone who does not enjoy spending huge amounts of time trouble-shooting on
the terminal should use bash. It's the default in most distributions, it
supports all major features a modern shell should.

~~~
Sheepshow
Never ran into any problems with vanilla zsh on Arch, Debian, or OSX -- just
pacman -Ss zsh || apt-get install zsh || brew install zsh. What kind of
problems did you run into?

------
aremm
This is quite sad, for a better alternative starter check out Paul Irish's
which seems to be based on mathias's. The link is here:
[https://github.com/paulirish/dotfiles](https://github.com/paulirish/dotfiles)

~~~
mathias
Indeed, looks like Bashstrap is a fork of my dotfiles (without giving any
credit, sadly). A lot of the commands, file structure, and even parts of the
readme are a direct copy-paste.

~~~
Udo
It contains this description:

 _Bootstrap for your terminal. A quick way to spruce up OSX terminal. It cuts
out the fluff, adds in timesaving features, and provides a solid foundation
for customizing your terminal style. Based on Mathias Bynens epic dotfiles
-[https://github.com/mathiasbynens/dotfiles*](https://github.com/mathiasbynens/dotfiles*)

Or was that added after posting it here?

~~~
mathias
That was added after posting it here.
[https://news.ycombinator.com/item?id=6951288](https://news.ycombinator.com/item?id=6951288)

------
poolpool
Since everyone likes mentioning oh-my-zsh I figured I would mentioned prezto

[https://github.com/sorin-ionescu/prezto](https://github.com/sorin-
ionescu/prezto)

which is a very nice alternative and much smaller.

~~~
rayshan
^This. Prezto a git workflow makes personalization easily maintainable and
deployment in new environments a snap.

------
k4rthik
bash alternate to oh-my-sh : [https://github.com/revans/bash-
it](https://github.com/revans/bash-it).
[https://github.com/mathiasbynens/dotfiles](https://github.com/mathiasbynens/dotfiles)
has a pretty good collection of dotfiles repos mentioned in its readme.md.
There are few more at [http://dotfiles.github.io/](http://dotfiles.github.io/)

~~~
barryclark
[https://github.com/mathiasbynens/dotfiles](https://github.com/mathiasbynens/dotfiles)
is fantastic, I refer to that a lot.

~~~
mathias
Actually, it looks like Bashstrap is a fork of
[https://github.com/mathiasbynens/dotfiles](https://github.com/mathiasbynens/dotfiles).
A lot of the commands, file structure, and even parts of the readme are a
direct copy-paste…

~~~
barryclark
I just added credit into the repo description. Thanks Mathias!

------
dinedal
I'm a zsh-er and use oh-my-zsh, but I borrowed the syntax highlighting, called
it `sat` short for "source cat", and piped through less for paginated output:

    
    
      # before use: [sudo] easy_install pygments
      alias sat='pygmentize -O style=monokai -f console256 -g | less'
    

I like these kinds of projects, because someone always shows me something in
my set up I don't have, and it's really trivial to borrow from them.

In return, I feel everyone should have a proper git log alias, here's mine:

    
    
      alias logg="git log --graph --oneline --all --decorate --abbrev-commit"
    

Example output: [http://d.pr/i/B9LT](http://d.pr/i/B9LT)

~~~
aktau
Instead of that git command, I just default to running "tig":
[http://blogs.atlassian.com/2013/05/git-
tig/](http://blogs.atlassian.com/2013/05/git-tig/) available everywhere it
counts (arch, debian, homebrew)

------
devNoise
The one thing I always add to my profile is "export COMMAND_MODE=unix2003".
This will make some commands behave as you would expect them to under Linux
instead of BSD.

Don't recall seeing that in my brief scan of the dotfiles.

~~~
Qerub
For the record: COMMAND_MODE=unix2003 is already default in Terminal(.app),
but it should definitely be set for iTerm.

------
dylandrop
The one area where I see this lacking is git autocomplete. Also personally I
wouldn't use the `s .` command for Sublime... maybe you could make some of the
aliases configurable rather than default?

------
nichochar
Oh My ZSH works very well for me. Love it

~~~
dmtroyer
+1 for Oh My Zsh. Has plugins for git, sublime_text, etc, and great support.

~~~
fredoliveira
You guys may want to check out prezto too: [https://github.com/sorin-
ionescu/prezto](https://github.com/sorin-ionescu/prezto)

------
twolfson
If you are interested in just the prompt, checkout
[https://github.com/twolfson/sexy-bash-
prompt](https://github.com/twolfson/sexy-bash-prompt)

------
caiob
I like Thoughtbot's dotfiles.
[https://github.com/thoughtbot/dotfiles](https://github.com/thoughtbot/dotfiles)

------
gauravarwalr
I have done something similar for bash, but its portable across iTerm and
Terminal app. [https://github.com/gauravagarwalr/Script-
BackUp/tree/master/...](https://github.com/gauravagarwalr/Script-
BackUp/tree/master/OS%20X/bash_scripts)

------
sneak
What's wrong with $EDITOR?

Why would I want a terminal command for using a GUI editor?

Why would I want a GUI editor at all?

~~~
Karunamon
>Why would I want a terminal command for using a GUI editor?

Because you use Sublime Text and you spend a lot of time at the CLI?

------
john2x
Where can I find a list of those unicode prompts?

~~~
barryclark
I usually pull from there tables -
[http://en.wikipedia.org/wiki/Unicode_symbols](http://en.wikipedia.org/wiki/Unicode_symbols)

