mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 21:52:12 +01:00
38 lines
513 B
Ruby
38 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
|
|
|