mirror of
https://github.com/cheat/cheat.git
synced 2024-11-22 05:51:35 +01:00
39 lines
513 B
Ruby
39 lines
513 B
Ruby
#!/usr/bin/env ruby
|
|
|
|
# look up the first argument passed to the script
|
|
cheat = case ARGV[0]
|
|
when 'git'
|
|
'
|
|
Need notes on how to:
|
|
1) Set colors
|
|
2) Set name / email
|
|
3) View/set remote branches
|
|
'
|
|
|
|
when 'tar'
|
|
'
|
|
tar
|
|
|
|
To extract an uncompressed archive:
|
|
tar -xvf /path/to/foo.tar
|
|
|
|
To extract a compressed archive:
|
|
tar -xzvf /path/to/foo.tgz
|
|
|
|
To create a compressed archive:
|
|
tar -czvf /path/to/foo.tgz /path/to/foo/
|
|
|
|
'
|
|
|
|
else
|
|
'No cheat sheet available.'
|
|
|
|
end
|
|
|
|
|
|
# find
|
|
|
|
# output
|
|
puts cheat
|
|
|