Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Unix shell for Ruby programmers.
branch: master

This branch is 106 commits behind Spakman:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
builtins
lib
test
COPYING
README
Rakefile
environment.rb
urchin

README

Urchin
===

A Unix shell for Ruby programmers. If you have any ideas for what you think
this should mean, please let me know!

Urchin does not aim to be POSIX compliant, but is heavily influenced by Bash
and Zsh. Urchin aims to make Ruby a first class citizen in the shell and be a
good place for experimenting with new shell ideas.


Authors
===

Mark Somerville <mark@scottishclimbs.com>
http://mark.scottishclimbs.com/
@_Spakman
Spakman on Freenode


Current status
===

Urchin has met my criteria for a first release (used as my login shell for a
week without breaking or annoying me)! I've found version 0.1.0 really rather
usable as my login shell for some weeks now (this doesn't mean you will!).

So far there is working job control, redirections, tilde expansion, aliasing,
globbing and environment variables.

Unfortunately, this means there isn't anything in Urchin right now that
provides any advantage over Bash/Zsh. Once a couple of more things are sorted
out, some integration with Ruby will put in place (allowing use of inline Ruby,
without escaping things).

Since this is really a preview release, there are no installation packages at
all.


Current problems
===

GitHub is used for ticket tracking: https://github.com/Spakman/urchin/issues

Feel free to use this to suggest features too. I will, when I get a chance!

I would like to see some things sorted before moving onto cooler features -
primarily, better tab-completion. I'm finding making use of the included
Readline module is hard work.


Requirements
===

Ruby
---
Tested with MRI 1.8.7 and 1.9.2. If running using 1.9.2 on a laptop, be aware
of bug #3436 (http://redmine.ruby-lang.org/issues/show/3436).

Readline support of some variety is needed. I've only really tested with GNU
Readline on Linux. Users of editline, rb-readline, RawLine, etc are welcome to
report/fix bugs!


ruby-termios
---
Tested with version 0.9.6.

Using via Rubygems is discouraged to save memory, but will work.


Some examples that work
===

Pipelines:

	ls -la | head -n2

Redirecting STDOUT, STDIN, STDERR:

	uptime > output
	uptime >> output
	ruby -e 'puts STDIN.read; STDERR.puts 33' < input > out_and_err 2>&1

Backgrounding jobs:

	sleep 60 &

Multiple jobs:

	sleep 60 & man sleep

	sleep 60; echo "it's over"

Quoted and unquoted parameters:

	grep -r '"hello"' .
	grep -r "\"hello\"" .
	ls my\ annoyingly\ named\ dir
	find . -name 'hello' -exec chmod 660 {} \;

Globbing:

	ls **/*.rb
	mv image?.{png,gif} images

Tilde expansion:

	ls ~/src/
	ls ~mark

Reading and setting environment variables:

	echo $PATH
	echo abx${HOME}xyz
	export HELLO="Yo man!"

Job control (uses fg, bg and jobs builtins).
Something went wrong with that request. Please try again.