Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
etersoft
eepm
Commits
0c6d5c27
You need to sign in or sign up before continuing.
Commit
0c6d5c27
authored
12 years ago
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add print our commands to bash completion, to print usage
parent
ca4de805
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
serv
bash_completion/serv
+3
-2
serv-usage
bin/serv-usage
+7
-0
No files found.
bash_completion/serv
View file @
0c6d5c27
...
...
@@ -5,13 +5,14 @@
#
_service_list()
{
COMPREPLY=( $( serv list-all 2>/dev/null ) )
COMPREPLY=( $( serv list-all 2>/dev/null
; echo "list list-all list-startup"
) )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
}
_service_usage_list()
{
COMPREPLY=( $( compgen -W '`serv ${prev##*/} 2>/dev/null | sed -e "y/|/ /" -ne "s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p" `' -- "$cur" ) )
local USLIST=$(serv ${prev##*/} usage 2>/dev/null | sed -e "y/|/ /" -ne "s/^.*\(u\|U\|msg_u\)sage.*{\(.*\)}.*$/\2/p")
COMPREPLY=( $( compgen -W '$USLIST' -- "$cur" ) )
}
...
...
This diff is collapsed.
Click to expand it.
bin/serv-usage
View file @
0c6d5c27
...
...
@@ -17,6 +17,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
_print_additional_usage
()
{
echo
"serv addition usage: {on|off|try-restart|usage}"
}
# Print usage of the service
serv_usage
()
{
...
...
@@ -40,4 +45,6 @@ serv_usage()
;;
esac
_print_additional_usage
}
This diff is collapsed.
Click to expand it.
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