Compare commits
No commits in common. "c3217a75e3d6f0c1be7c69731e2d1e21b47e96f2" and "26510531e787645047ad6ca9de10a8c5724f94bd" have entirely different histories.
c3217a75e3
...
26510531e7
5 changed files with 23 additions and 7 deletions
16
src/commands/global_mapping.cr
Normal file
16
src/commands/global_mapping.cr
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
require "./abstract_command"
|
||||||
|
|
||||||
|
module GX::Commands
|
||||||
|
class GlobalMapping < AbstractCommand
|
||||||
|
def initialize(config : GX::Config) # FIXME
|
||||||
|
end
|
||||||
|
|
||||||
|
def execute
|
||||||
|
# FIXME: implement
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.handles_mode
|
||||||
|
GX::Types::Mode::GlobalMapping
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -2,15 +2,11 @@ require "./abstract_command"
|
||||||
|
|
||||||
module GX::Commands
|
module GX::Commands
|
||||||
class MappingCreate < AbstractCommand
|
class MappingCreate < AbstractCommand
|
||||||
def initialize(@config : GX::Config) # FIXME
|
def initialize(config : GX::Config) # FIXME
|
||||||
@config.load_from_env
|
|
||||||
@config.load_from_file
|
|
||||||
@file_system_manager = FileSystemManager.new(@config)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def execute
|
def execute
|
||||||
# FIXME: implement
|
# FIXME: implement
|
||||||
puts "mapping create yo!"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.handles_mode
|
def self.handles_mode
|
||||||
|
|
|
@ -37,7 +37,7 @@ module GX::Parsers
|
||||||
|
|
||||||
# Filesystem specific
|
# Filesystem specific
|
||||||
parser.on("--encrypted-path PATH", "Set encrypted path (for gocryptfs)") do |path|
|
parser.on("--encrypted-path PATH", "Set encrypted path (for gocryptfs)") do |path|
|
||||||
create_args = create_args.merge({encrypted_path: path})
|
encrypted_path = path
|
||||||
end
|
end
|
||||||
parser.on("--remote-user USER", "Set SSH user (for sshfs)") do |user|
|
parser.on("--remote-user USER", "Set SSH user (for sshfs)") do |user|
|
||||||
create_args = create_args.merge({remote_user: user})
|
create_args = create_args.merge({remote_user: user})
|
||||||
|
|
|
@ -64,6 +64,10 @@ module GX::Parsers
|
||||||
Parsers::MappingParser.new.build(parser, breadcrumbs, config)
|
Parsers::MappingParser.new.build(parser, breadcrumbs, config)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# parser.on("interactive", "Interactive mapping mount/umount") do
|
||||||
|
# abort("FIXME: Not implemented")
|
||||||
|
# end
|
||||||
|
|
||||||
parser.on("completion", "Manage completion") do
|
parser.on("completion", "Manage completion") do
|
||||||
config.mode = Types::Mode::GlobalCompletion
|
config.mode = Types::Mode::GlobalCompletion
|
||||||
Parsers::CompletionParser.new.build(parser, breadcrumbs, config)
|
Parsers::CompletionParser.new.build(parser, breadcrumbs, config)
|
||||||
|
|
|
@ -7,7 +7,7 @@ module GX::Types
|
||||||
GlobalCompletion
|
GlobalCompletion
|
||||||
GlobalTui
|
GlobalTui
|
||||||
GlobalConfig
|
GlobalConfig
|
||||||
# GlobalMapping
|
GlobalMapping
|
||||||
|
|
||||||
ConfigInit
|
ConfigInit
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue