My `awk` and `sed` skills are virtually non-existent, so I've got to admin I don't really understand the sed expression at all there.  This is easy enough to do in pure ruby:

``` ruby
Dir.pwd.split('/').last
```

The pure ruby version, besides being way easier for a rubyist to understand, is also faster:

```
$ time (for i in {1..50}; do ruby -e '`pwd | sed "s/.*\\///"`' default; done)
( for i in {1..50}; do; ruby -e '`pwd | sed "s/.*\\///"`' default; done; )  0.80s user 0.49s system 96% cpu 1.336 total
$ time (for i in {1..50}; do ruby -e "Dir.pwd.split('/').last" default; done)
( for i in {1..50}; do; ruby -e "Dir.pwd.split('/').last" default; done; )  0.68s user 0.25s system 93% cpu 0.985 total
```

I suspect the slowness is due to the overhead of shelling out (I've heard that's expensive).