We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5ccc01 commit 6d4f80dCopy full SHA for 6d4f80d
1 file changed
lib/path_expander.rb
@@ -1,3 +1,5 @@
1
+require "pathname" unless defined? Pathname
2
+
3
##
4
# PathExpander helps pre-process command-line arguments expanding
5
# directories into their constituent files. It further helps by
@@ -55,9 +57,11 @@ def expand_dirs_to_files *dirs
55
57
else
56
58
p
59
end
- }.flatten.sort.map { |s| s.to_s.delete_prefix "./" }
60
+ }.flatten.sort.map { |s| _normalize s }
61
62
63
+ def _normalize(f) = Pathname.new(f).cleanpath.to_s # :nodoc:
64
65
66
# Process a file into more arguments. Override this to add
67
# additional capabilities.
0 commit comments