mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-20 09:47:57 +02:00
Add usage information to maid.cr
This commit is contained in:
parent
d591471263
commit
7877003aca
25
src/maid.cr
25
src/maid.cr
@ -53,10 +53,33 @@ module Maid
|
|||||||
end
|
end
|
||||||
|
|
||||||
def help()
|
def help()
|
||||||
puts "Help"
|
puts Trucolor.format({125, 255, 0}, "Usage: maid [command]")
|
||||||
|
_hr("Always used:")
|
||||||
|
_hc("up", "Replace the file upstream with the file downstream")
|
||||||
|
_hc("down", "Replace the file downstream with the file upstream")
|
||||||
|
_hc("status", "List the files that aren't in sync with upstream")
|
||||||
|
_hr("Sometimes used:")
|
||||||
|
_hc("diff", "View the lines that differ between upstream and downstream")
|
||||||
|
_hr("Rarely used:")
|
||||||
|
_hc("add", "Copy a file from downstream to upstream")
|
||||||
|
_hc("remove", "Removes a file from upstream, preventing it from being tracked")
|
||||||
|
_hn("Ideally you should only edit files locally (i.e. not upstream)")
|
||||||
|
_hn("Then pushing your changes is as simple as typing 'maid up'!")
|
||||||
exit 0
|
exit 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private def _hc(command, description)
|
||||||
|
puts Trucolor.format({255, 55, 225}, " #{command.ljust(14, ' ')}#{description}")
|
||||||
|
end
|
||||||
|
|
||||||
|
private def _hr(message)
|
||||||
|
puts Trucolor.format({12, 155, 255}, " #{message}")
|
||||||
|
end
|
||||||
|
|
||||||
|
private def _hn(note)
|
||||||
|
puts Trucolor.format({255, 128, 10}, "#{note}")
|
||||||
|
end
|
||||||
|
|
||||||
def up()
|
def up()
|
||||||
puts "Up"
|
puts "Up"
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user