filechooser 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/filechooser/api.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f562fbbb9ab5b6f9f54bbabbda07ae31cb8fa00d
|
4
|
+
data.tar.gz: 98084853197deb209cb247aad7671dcdef7ba054
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55ec876f4ecc439e46fc21f8782fe354fe6488adb920da6b08ba3948d6016e63a2b7a098392e19e69a6f95fd36c266f2d441dce303f301a71be3c762fcceb956
|
7
|
+
data.tar.gz: 66bc875e39adfee48e26503d502ba16405944a70cba4e74c707cba8225de866767843c812d0a773ab031fbd38bb32c4e86caee658ec33c950ff20eda7ec11050
|
data/lib/filechooser/api.rb
CHANGED
@@ -8,7 +8,10 @@ module Filechooser
|
|
8
8
|
case get_answer(p0)
|
9
9
|
when /[cC]/ then return p0.to_s
|
10
10
|
when /[xX]/ then return ''
|
11
|
-
when /[
|
11
|
+
when /[lL]/ then Dir.chdir(p0) do
|
12
|
+
system("ls -d */ ") # list directories only
|
13
|
+
end
|
14
|
+
when /[dD]/ then Highline.cli.say("Subdirectories of '#{p0}':".style(":info"))
|
12
15
|
uvz=choose_uvz(p0)
|
13
16
|
if uvz==''
|
14
17
|
Highline.cli.say("No subdirectories found.".style(":warning"))
|
@@ -59,7 +62,8 @@ module Filechooser
|
|
59
62
|
return datei.to_s
|
60
63
|
end
|
61
64
|
when /[xX]/ then return ''
|
62
|
-
when /[
|
65
|
+
when /[lL]/ then system("ls -p '#{p0}'") # List directories with a trailing forward-slash
|
66
|
+
when /[dD]/ then Highline.cli.say("Subdirectories of '#{p0}':".style(":info"))
|
63
67
|
uvz=choose_uvz(p0)
|
64
68
|
if uvz==''
|
65
69
|
Highline.cli.say("No subdirectories found.".style(":warning"))
|
@@ -102,7 +106,7 @@ module Filechooser
|
|
102
106
|
sd=unterverzeichnisse(p0).length # p0.children.select(&:directory?).length would count hidden folders too
|
103
107
|
f=dateien(p0).length
|
104
108
|
Highline.cli.say("(#{sd} directories, #{f} files)".style(":info"))
|
105
|
-
choices= "(C)hoose (D)own (U)p (N)ew E(x)it ? "
|
109
|
+
choices= "(L)ist (C)hoose (D)own (U)p (N)ew E(x)it ? "
|
106
110
|
answer = Highline.cli.ask(choices.style(":ask_line")) {|q| q.character = true}
|
107
111
|
end
|
108
112
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filechooser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jogan Thums
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|