Working completion app and server

This commit is contained in:
3wc
2020-10-30 17:50:20 +02:00
parent c6b841de6c
commit 3e0b9e9475
2 changed files with 112 additions and 45 deletions

12
abra
View File

@ -842,18 +842,6 @@ sub_volume() {
docker volume $@
}
#######################################
# Bash completion helpers
#######################################
sub_command_ls() {
docopt_exit 2>&1 | \
tail -n+2 | \
sed -s -e 's/^\s\+//g' -e 's/(\([^)]*\)|.*)/\1/' -e 's/\[options\]//g' \
-e 's/ <[^>]\+>//g' -e 's/\.\.\.//g' -e 's/^abra\s*//' -e '/^$/d' | \
sort -u
}
#######################################
# Main
#######################################