Merge pull request 'feat: add defaut FZF options when none defined' (#34) from feature/29-add-default-display-options-for-fzf into develop
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #34
This commit is contained in:
commit
0eda2a1003
2 changed files with 8 additions and 0 deletions
|
@ -96,6 +96,7 @@ module GX
|
|||
when Config::Mode::ShowVersion
|
||||
STDOUT.puts "#{PROGRAM_NAME} #{VERSION}"
|
||||
when Config::Mode::Mount
|
||||
@config.load_from_env
|
||||
@config.load_from_file
|
||||
filesystem = choose_filesystem
|
||||
raise Models::InvalidFilesystemError.new("Invalid filesystem") if filesystem.nil?
|
||||
|
|
|
@ -73,6 +73,13 @@ module GX
|
|||
raise MissingFileError.new("Configuration file not found")
|
||||
end
|
||||
|
||||
def load_from_env()
|
||||
if !ENV["FZF_DEFAULT_OPTS"]?
|
||||
# force defaults settings if none defined
|
||||
ENV["FZF_DEFAULT_OPTS"] = "--height 40% --layout=reverse --border"
|
||||
end
|
||||
end
|
||||
|
||||
def load_from_file
|
||||
config_path = @path
|
||||
if config_path.nil?
|
||||
|
|
Loading…
Reference in a new issue