Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
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
korinf
etersoft-build-utils
Commits
4623072e
Commit
4623072e
authored
Nov 15, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
showcmd: print quote for args with spaces
parent
ca1e4355
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
common
share/eterbuild/functions/common
+16
-9
No files found.
share/eterbuild/functions/common
View file @
4623072e
...
@@ -508,23 +508,30 @@ check_display()
...
@@ -508,23 +508,30 @@ check_display()
$XSET
-b
$XSET
-b
}
}
# Print command line
and run command line
# Print command line
only
do
cmd
()
show
cmd
()
{
{
local
i
SETCOLOR_SUCCESS
SETCOLOR_SUCCESS
echo
"
\$
$@
"
echo
-n
"
\$
"
for
i
in
"
$@
"
;
do
# print with qoutes if args have spaces
echo
-n
" "
echo
-n
"
$i
"
|
sed
-e
"s|
\(
.* .*
\)
|'
\1
'|g"
done
echo
SETCOLOR_NORMAL
SETCOLOR_NORMAL
"
$@
"
}
}
# Print command line
only
# Print command line
and run command line
show
cmd
()
do
cmd
()
{
{
SETCOLOR_SUCCESS
showcmd
"
$@
"
echo
"
\$
$@
"
"
$@
"
SETCOLOR_NORMAL
}
}
# Example:
# Example:
# $ command $(usearg -d "$PARAM")
# $ command $(usearg -d "$PARAM")
# will add -d "$PARAM" if $PARAM is not empty
# will add -d "$PARAM" if $PARAM is not empty
...
...
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