home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
ruby164.zip
/
rbemx164.zip
/
ruby
/
share
/
doc
/
optparse-0.8.2
/
cmd-ls.rb
< prev
next >
Wrap
Text File
|
2001-06-18
|
329b
|
16 lines
#! /usr/bin/ruby
parser = OptionParser.new do |q|
q.banner = "Usage: #{$0} [common-options] ls [options]\n"
q.on('--directory=DIR', 'change directory', String) {|dir|Dir.chdir(dir)}
end
begin
parser.parse!(ARGV)
rescue OptionParser::ParseError
STDERR.puts parser
exit 1
end
$cmd = proc {|*args| system('ls', *args)}