mirror of
https://github.com/Morantron/tmux-fingers.git
synced 2024-06-28 07:40:57 +02:00
25 lines
525 B
Crystal
25 lines
525 B
Crystal
|
require "./commands/*"
|
||
|
|
||
|
module Fingers
|
||
|
class Cli
|
||
|
def run
|
||
|
return if ARGV.size == 0
|
||
|
|
||
|
command, *args = ARGV
|
||
|
|
||
|
cmd = case command
|
||
|
when "start"
|
||
|
Fingers::Commands::Start.new(args)
|
||
|
when "load-config"
|
||
|
Fingers::Commands::LoadConfig.new(args)
|
||
|
when "send-input"
|
||
|
Fingers::Commands::SendInput.new(args)
|
||
|
when "version"
|
||
|
Fingers::Commands::Version.new(args)
|
||
|
end
|
||
|
|
||
|
cmd.run if cmd
|
||
|
end
|
||
|
end
|
||
|
end
|