G R A N T   S T A V E L Y

If you already have a working bash shell and are just looking to extend bash’s tab completion capabilities, do not pass go, proceed directly to Ian MacDonald’s programable bash completion project. Then read the rest of his advice, it is excellent.

To skip bash completely and try an entirely new shell, give fish or less crazy, zsh a shot.

If you are looking for bash in Windows and Cygwin help, continue reading.

cmd.exe is really terrible.

There are hackish Unix workarounds but none that really come through. Cygwin’s default install leaves us with the Cygwin Bash Shell, which is just bash running in (drumroll please) cmd.exe. It also comes with rxvt.exe which is fast and actually a terminal and instead of just a process running within cmd.exe, but it isn’t easily configurable and has a nasty looking scrollbar.

Mark Edgar’s PuTTYcyg to the rescue!

It’s easy.

Install Cygwin. This should give you a working unix environment, home directory, shell, and Cygwin bash shell. Launch the included Cygwin Bash Shell shortcut to remind yourself how lame it is. It uses cmd.exe! Gross! It should dump you in your home directory.

Download the latest release of Mark Edgar’s patched PuTTY executables. I like to keep all that stuff in ~/bin, which is in c:\home\bin on my laptop. You probably want to add c:\home\bin to your PATH environment variables in windows. Yours might be different. If you aren’t sure, type “set | grep -i home” in the default Cygwin shell to find out.

Launch the putty.exe you just extracted. It looks like the normal Putty GUI but there is a new connection type radio button labeled Cygterm. Select that. Label it whatever you like, I call mine ‘local’ and hit save. Then click the Open button and you are off!

Cygterm

You should probably go back and tweak your shell settings now that you have a working shell in windows. From the top-left corner context menu, select “Change Settings…”

I like to enable logging, use a lighter gray background, turn on the visual-bell and blinking cursor, and modify all of the colors assignments. Once you are happy, go back to the top “Session” menu and save your session over your ‘local’ bookmark.

My shell

NB: Not all dos commands work well within PuTTYcyg. Some of the sysinternal tools (pstools for example) that request passwords misbehave and are useless. Keep in mind that the shell is interpreted like a unix shell, so you’ll need to escape backslashes and so on.

Now go back to the cygwin setup and grab bash and bash completion. You will need to add the bash completion files to your startup by sourcing it in a bash dotfile like .bash_profile or .bashrc

if [ "$PS1" ] && [ $bmajor -eq 2 ] && [ $bminor '>' 04 ] \ && [ -f /etc/bash_completion ]; then # interactive shell # Source completion code . /etc/bash_completion fi

To jump right to your shell and have a shortcut in your quicklaunch or on your desktop, use Putty’s -launch flag.

I’m always looking for something better, let me know if it’s out there!



Textile Help

@wardspan where are the cool kids?


RT @0xcharlie: Yeah! @dionthegod won the pwnie for best research. Congrats!


@jackwillk welcome, I am at the far side of the pool wishing I had my suit.


New school: The Verizon 2010 Data Breach Investigations Report: http://securityblog.verizonbusiness.com/2010/07/28/2010-dbir-released/


@charmsec I'll need you to set up the Skype telepresence rig you promised me. I look forward to catching up w/ those of you in LV this week!


Because @_defcon_ attendees are changing their profile pictures to network easier, I've found a video to augment mine: http://goo.gl/ATYN


@kathybarnett it's tough to cycle without going clipless. The real advantage though: Goofy shoes + Bunny-hops.


I'm clicking a cow. http://goo.gl/Wiad


"Hi, I hold ignorant and often illogical, divisive positions."

...

"refudiate—oops, refute/repudiate. *undo*"

LANGUAGE GAFFES! BURN HER!


One of our cats has a clear plastic cone-collar on 'til something clears up. Her reaction suggest like she's experiencing the 4th dimension.


I͈̮͕̼͓̗͚̎͗̊̈́ͤ̋t͍͉͎͇̫̥͍̿͒̔̊̏'s͖̻̩̙̮̘͇ Z̮̱̼̟̘̙̰ͪͭa̮̗̱͙̞̻͛̂ͅl͕̋́̽d̲̰̱ͯͅo͚ͮ͑ͨ͋̋̓ ̗̳͚̯ͫ̉͐̂ͫͨḁ͚̩̗̂̂̊ͨ̊g͚͚̘̜̦̲ͦ̊ͭ̇̚ͅa̝ͥ͂ͭ̍̿ȉ͈͆ͬ̃̌n̼͙͉͚̜̾͆ͯ̾̂.


Logged User-Agent strings differing from legit ones by typos or truncation are: a) Purloined letters b) Lazy c) Stupid d) What are logs?


@will_torres uh, hey Will?

Wanna see my bracket for the World Cup?

[


Grandma.

@bbaskin An expanded URL only claims to not be a 302. The web is a Skinner box: I just frantically click on everything underlined. Yay!


I accidentally bought a large-print _Evil_Eye_The_Origins_And_Practices_of_Superstition. And you know what that means. http://goo.gl/WmAk


@jackwillk getting back into home brewing is as easy as having an address to ask @MoreBeer_B3 to send ingredients to. Go for it!


I enjoyed @cshirky's Cognitive Surplus this week.

Where Carr seems to continue rediscovering Plato on media, Shirky finds opportunity.


"Memes!", H4cKe® said, kicking up his feet to pause from writing "show-us-your-tits" jokes on his black-background website. #pebkac


@jackwillk at least you acknowledge that your fear is irrational! http://goo.gl/2kZ0