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
469277cc
Commit
469277cc
authored
May 09, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add initial epm bash completion
parent
69f74989
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
Makefile
Makefile
+1
-0
eepm
bash_completion/eepm
+50
-0
No files found.
Makefile
View file @
469277cc
...
@@ -29,6 +29,7 @@ install_common:
...
@@ -29,6 +29,7 @@ install_common:
mkdir
-p
$(DESTDIR)$(sysconfdir)/bash_completion.d/
mkdir
-p
$(DESTDIR)$(sysconfdir)/bash_completion.d/
install
-m
0644
bash_completion/serv
$(DESTDIR)$(sysconfdir)/bash_completion.d/serv
install
-m
0644
bash_completion/serv
$(DESTDIR)$(sysconfdir)/bash_completion.d/serv
install
-m
0644
bash_completion/eepm
$(DESTDIR)$(sysconfdir)/bash_completion.d/eepm
# shebang.req.files
# shebang.req.files
chmod
a+x
$(DESTDIR)$(pkgdatadir)/serv-*
chmod
a+x
$(DESTDIR)$(pkgdatadir)/serv-*
...
...
bash_completion/eepm
0 → 100644
View file @
469277cc
# eepm(8) completion
# This completes on a list of all available services for the
# 'serv' command, followed by that script's available commands
#
__eepm_list_commands()
{
COMPREPLY=( $(echo "install remove") )
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
}
__eepm_list_available_packages()
{
COMPREPLY=( $( cat /var/lib/eepm/available-packages 2>/dev/null ) )
#local USLIST=$(serv ${prev##*/} usage 2>/dev/null | sed -e "y/|/ /" -ne "s/^.*\(u\|U\|msg_u\)sage.*{\(.*\)}.*$/\2/p")
COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
#COMPREPLY=( $( compgen -W '$USLIST' -- "$cur" ) )
}
__eepm()
{
local cur prev
COMPREPLY=()
_get_comp_words_by_ref cur prev
[[ ${COMP_WORDS[0]} != "epm" ]] && return 0
# don't complete past 2nd token
#[ $COMP_CWORD -gt 2 ] && return 0
if [[ $COMP_CWORD -eq 1 && $prev == "epm" ]]; then
__eepm_list_commands
return 0
fi
if [[ $COMP_CWORD -eq 2 && $prev == "install" ]]; then
__eepm_list_available_packages
return 0
fi
if [[ $COMP_CWORD -eq 2 && $prev == "remove" ]]; then
__eepm_list_available_packages
return 0
fi
return 0
} &&
complete -F __eepm epm
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