WIP: feature/1-add-support-for-fs-crud #47
8 changed files with 12 additions and 14 deletions
|
@ -18,7 +18,7 @@ module GX::Commands
|
|||
# Override the configuration path if provided
|
||||
puts "Configuration file path: #{config_file_path}"
|
||||
puts "Configuration file path: #{@config.path}"
|
||||
pp @config
|
||||
# pp @config
|
||||
@config.path.try do |path|
|
||||
config_file_path = path
|
||||
config_dir = File.dirname(path)
|
||||
|
|
|
@ -8,7 +8,7 @@ require "../config"
|
|||
|
||||
module GX::Commands
|
||||
class GlobalVersion < AbstractCommand
|
||||
def initialize(config : GX::Config) # FIXME
|
||||
def initialize(config : GX::Config)
|
||||
end
|
||||
|
||||
def execute
|
||||
|
|
|
@ -7,7 +7,7 @@ require "./abstract_command"
|
|||
|
||||
module GX::Commands
|
||||
class MappingCreate < AbstractCommand
|
||||
def initialize(@config : GX::Config) # FIXME
|
||||
def initialize(@config : GX::Config)
|
||||
@config.load_from_env
|
||||
@config.load_from_file
|
||||
end
|
||||
|
|
|
@ -7,11 +7,11 @@ require "./abstract_command"
|
|||
|
||||
module GX::Commands
|
||||
class MappingDelete < AbstractCommand
|
||||
def initialize(config : GX::Config) # FIXME
|
||||
def initialize(config : GX::Config)
|
||||
end
|
||||
|
||||
def execute
|
||||
# FIXME: implement
|
||||
# TODO: implement
|
||||
end
|
||||
|
||||
def self.handles_mode
|
||||
|
|
|
@ -7,11 +7,11 @@ require "./abstract_command"
|
|||
|
||||
module GX::Commands
|
||||
class MappingEdit < AbstractCommand
|
||||
def initialize(config : GX::Config) # FIXME
|
||||
def initialize(config : GX::Config)
|
||||
end
|
||||
|
||||
def execute
|
||||
# FIXME: implement
|
||||
# TODO: implement
|
||||
end
|
||||
|
||||
def self.handles_mode
|
||||
|
|
|
@ -27,7 +27,6 @@ module GX
|
|||
record AddArgs, name : String, path : String
|
||||
record DelArgs, name : String
|
||||
|
||||
# getter filesystems : Array(Models::AbstractFilesystemConfig)
|
||||
getter home_dir : String
|
||||
getter root : Models::RootConfig?
|
||||
|
||||
|
|
|
@ -10,4 +10,3 @@ class FileStorage
|
|||
|
||||
bake_folder "../static"
|
||||
end
|
||||
|
||||
|
|
|
@ -42,10 +42,10 @@ module GX
|
|||
end
|
||||
|
||||
def auto_open(filesystem)
|
||||
# FIXME: detect xdg-open and use it if possible
|
||||
# FIXME: detect mailcap and use it if no xdg-open found
|
||||
# FIXME: support user-defined command in configuration
|
||||
# FIXME: detect graphical environment
|
||||
# TODO: detect xdg-open and use it if possible
|
||||
# TODO: detect mailcap and use it if no xdg-open found
|
||||
# TODO: support user-defined command in configuration
|
||||
# TODO: detect graphical environment
|
||||
|
||||
mount_point_safe = filesystem.mount_point
|
||||
raise Models::InvalidMountpointError.new("Invalid filesystem") if mount_point_safe.nil?
|
||||
|
@ -111,7 +111,7 @@ module GX
|
|||
}
|
||||
end
|
||||
|
||||
# # FIXME: feat: allow to sort by name or by filesystem
|
||||
# FIXME: feat: allow to sort by name or by filesystem
|
||||
sorted_values = names_display.values.sort_by!(&.[:filesystem].name)
|
||||
result_filesystem_name = Utils::Fzf.run(sorted_values.map(&.[:ansi_name])).strip
|
||||
selected_filesystem = names_display[result_filesystem_name][:filesystem]
|
||||
|
|
Loading…
Reference in a new issue