Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
0824dcc9
Commit
0824dcc9
authored
Jun 01, 2019
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
installer: allow for tput errors
tput may throw errors on invalid $TERM values, for example. This shorthand syntax allows for that as well as for if tput doesn't exist.
parent
2e54ba2d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
install.sh
tools/install.sh
+1
-5
No files found.
tools/install.sh
View file @
0824dcc9
...
@@ -52,11 +52,7 @@ error() {
...
@@ -52,11 +52,7 @@ error() {
# Set up color sequences
# Set up color sequences
setup_color
()
{
setup_color
()
{
if
command_exists tput
;
then
ncolors
=
$(
tput colors 2>/dev/null
)
||
ncolors
=
0
ncolors
=
$(
tput colors
)
else
ncolors
=
0
fi
# Only use colors if connected to a terminal that supports them
# Only use colors if connected to a terminal that supports them
if
[
-t
1
]
&&
[
$ncolors
-ge
8
]
;
then
if
[
-t
1
]
&&
[
$ncolors
-ge
8
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment