summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-04-17 21:14:13 -0700
committerGitHub <noreply@github.com>2019-04-17 21:14:13 -0700
commitc341bf4aee92a22724cdc2b1dd37e8ff6590b961 (patch)
treec71cdc5c817855fa9f3026b466a229f3747a849a /lib
parente8acbca986f8e2df378442a1dad45a97fd6302ed (diff)
parente032b157d18fabaad979b2fe41779514996117f4 (diff)
downloadchef-c341bf4aee92a22724cdc2b1dd37e8ff6590b961.tar.gz
Merge pull request #8381 from chef/kill_highline
Replace highline with tty-screen in knife list
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/knife/list.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/chef/knife/list.rb b/lib/chef/knife/list.rb
index 5d95790a26..03954dcf00 100644
--- a/lib/chef/knife/list.rb
+++ b/lib/chef/knife/list.rb
@@ -25,30 +25,35 @@ class Chef
deps do
require "chef/chef_fs/file_system"
- require "highline"
+ require "tty-screen"
end
option :recursive,
short: "-R",
boolean: true,
description: "List directories recursively"
+
option :bare_directories,
short: "-d",
boolean: true,
description: "When directories match the pattern, do not show the directories' children"
+
option :local,
long: "--local",
boolean: true,
description: "List local directory instead of remote"
+
option :flat,
short: "-f",
long: "--flat",
boolean: true,
description: "Show a list of filenames rather than the prettified ls-like output normally produced"
+
option :one_column,
short: "-1",
boolean: true,
description: "Show only one column of results"
+
option :trailing_slashes,
short: "-p",
boolean: true,
@@ -143,7 +148,7 @@ class Chef
if config[:one_column] || !stdout.isatty
columns = 0
else
- columns = HighLine::SystemExtensions.terminal_size[0]
+ columns = TTY::Screen.columns
end
current_line = ""
results.each do |result|