Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
d49c9818
Commit
d49c9818
authored
10 years ago
by
Todd Gamblin
Browse files
Options
Downloads
Patches
Plain Diff
Add an override to colify so we can set terminal dimensions.
parent
065e5ccd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/spack/docs/conf.py
+1
-3
1 addition, 3 deletions
lib/spack/docs/conf.py
lib/spack/llnl/util/tty/colify.py
+9
-0
9 additions, 0 deletions
lib/spack/llnl/util/tty/colify.py
with
10 additions
and
3 deletions
lib/spack/docs/conf.py
+
1
−
3
View file @
d49c9818
...
@@ -48,9 +48,7 @@
...
@@ -48,9 +48,7 @@
# Set an environment variable so that colify will print output like it would to
# Set an environment variable so that colify will print output like it would to
# a terminal.
# a terminal.
os
.
environ
[
'
COLIFY_TTY
'
]
=
'
true
'
os
.
environ
[
'
COLIFY_SIZE
'
]
=
'
25x80
'
os
.
environ
[
'
COLUMNS
'
]
=
'
80
'
os
.
environ
[
'
LINES
'
]
=
'
25
'
# Enable todo items
# Enable todo items
todo_include_todos
=
True
todo_include_todos
=
True
...
...
This diff is collapsed.
Click to expand it.
lib/spack/llnl/util/tty/colify.py
+
9
−
0
View file @
d49c9818
...
@@ -169,6 +169,15 @@ def colify(elts, **options):
...
@@ -169,6 +169,15 @@ def colify(elts, **options):
if
not
elts
:
if
not
elts
:
return
(
0
,
())
return
(
0
,
())
# environment size is of the form "<rows>x<cols>"
env_size
=
os
.
environ
.
get
(
'
COLIFY_SIZE
'
)
if
env_size
:
try
:
r
,
c
=
env_size
.
split
(
'
x
'
)
console_rows
,
console_cols
=
int
(
r
),
int
(
c
)
tty
=
True
except
:
pass
# Use only one column if not a tty.
# Use only one column if not a tty.
if
not
tty
:
if
not
tty
:
if
tty
is
False
or
not
output
.
isatty
():
if
tty
is
False
or
not
output
.
isatty
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment