mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-06-15 23:35:19 +02:00
Add bash completion for the command names
This commit is contained in:
parent
6a1859d627
commit
357361eaac
3 changed files with 22 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -84,3 +84,6 @@ js/chibi.*
|
|||
|
||||
build-lib/chibi/char-set/derived.scm
|
||||
build-lib/chibi/char-set/width.scm
|
||||
|
||||
# vim swapfiles
|
||||
*.swp
|
||||
|
|
8
Makefile
8
Makefile
|
@ -415,7 +415,12 @@ install-base: all
|
|||
$(INSTALL) -m0644 doc/chibi-doc.1 $(DESTDIR)$(MANDIR)/
|
||||
-if type $(LDCONFIG) >/dev/null 2>/dev/null; then $(LDCONFIG) >/dev/null 2>/dev/null; fi
|
||||
|
||||
install: install-base
|
||||
install-bash-completion:
|
||||
if [ -d "/etc/bash_completion.d" ]; then \
|
||||
cp tools/snow-chibi-completion.bash /etc/bash_completion.d/snow-chibi; \
|
||||
fi
|
||||
|
||||
install: install-base install-bash-completion
|
||||
ifneq "$(IMAGE_FILES)" ""
|
||||
echo "Generating images"
|
||||
-[ -z "$(DESTDIR)" ] && LD_LIBRARY_PATH="$(SOLIBDIR):$(LD_LIBRARY_PATH)" DYLD_LIBRARY_PATH="$(SOLIBDIR):$(DYLD_LIBRARY_PATH)" CHIBI_MODULE_PATH="$(MODDIR):$(BINMODDIR)" $(BINDIR)/chibi-scheme$(EXE) -mchibi.repl -d $(MODDIR)/chibi.img
|
||||
|
@ -497,6 +502,7 @@ uninstall:
|
|||
-$(RMDIR) $(DESTDIR)$(MODDIR) $(DESTDIR)$(BINMODDIR)
|
||||
-$(RM) $(DESTDIR)$(MANDIR)/chibi-scheme.1 $(DESTDIR)$(MANDIR)/chibi-ffi.1 $(DESTDIR)$(MANDIR)/chibi-doc.1
|
||||
-$(RM) $(DESTDIR)$(PKGCONFDIR)/chibi-scheme.pc
|
||||
-$(RM) /etc/bash_completion.d/snow-chibi
|
||||
|
||||
dist: distclean
|
||||
$(RM) chibi-scheme-$(CHIBI_VERSION).tgz
|
||||
|
|
12
tools/snow-chibi-completion.bash
Normal file
12
tools/snow-chibi-completion.bash
Normal file
|
@ -0,0 +1,12 @@
|
|||
#/usr/bin/env bash
|
||||
|
||||
_snow_chibi_completions() {
|
||||
if [ "${#COMP_WORDS[@]}" -gt "2" ]
|
||||
then
|
||||
COMPREPLY=($(compgen -f -- "${COMP_WORDS[COMP_CWORD]}"))
|
||||
else
|
||||
COMPREPLY=($(compgen -W "search show install upgrade remove status package gen-key reg-key sign verify upload index update implementations help" "${COMP_WORDS[COMP_CWORD]}"))
|
||||
fi
|
||||
}
|
||||
|
||||
complete -o bashdefault -F _snow_chibi_completions snow-chibi
|
Loading…
Add table
Reference in a new issue