Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 14 lines (12 sloc) 356 Bytes
#!/usr/bin/env ruby
#
# Replaces my custom ZSH shell prompt with the more conventional $ prefix.
#
# Written in 2012 by Suraj N. Kurapati <https://github.com/sunaku>
print ARGF.read.gsub(/^(.+?)>(.+?)(?:\s*#(?: \d|\d{2})\w+\d+:\d+[ap]m)?$/) { |original|
if File.directory? File.expand_path($1.split.last.to_s)
"\n$#{$2}"
else
original
end
}