multiple conditions -> method should_expand_match?
This commit is contained in:
parent
b2f7567d0a
commit
193d01601f
|
@ -124,9 +124,14 @@ module Fingers
|
|||
|
||||
# This takes care of some path expansion weirdness when opening paths that start with ~ in MacOS
|
||||
def expanded_match
|
||||
return match unless action == ":open:" && match.starts_with?("~")
|
||||
return match unless should_expand_match?
|
||||
|
||||
Path[match].expand(base: original_pane.pane_current_path, home: Path.home)
|
||||
end
|
||||
|
||||
private def should_expand_match?
|
||||
action == ":open:" && match.starts_with?("~")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue