Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
a1044d72
Commit
a1044d72
authored
Apr 01, 2018
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
general: Swap echo to printf
parent
81db772a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
neofetch
neofetch
+3
-12
No files found.
neofetch
View file @
a1044d72
...
@@ -3263,19 +3263,10 @@ get_bold() {
...
@@ -3263,19 +3263,10 @@ get_bold() {
}
}
trim() {
trim() {
# When a string is passed to "echo" all trailing and leading
# whitespace is removed and inside the string multiple spaces are
# condensed into single spaces.
#
# The "set -f/+f" is here so that "echo" doesn'
t
cause any expansion
# of special characters.
#
# The whitespace trim doesn
't work with multiline strings so we use
# "${1//[[:space:]]/ }" to remove newlines before we trim the whitespace.
set -f
set -f
# shellcheck disable=2086
# shellcheck disable=2048,2086
builtin echo -E ${1//[[:space:]]/ }
set -- $*
printf "%s\\n" "${*//[[:space:]]/ }"
set +f
set +f
}
}
...
...
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