From 9dcd49e2dade1637d920158b0390eb99615430a4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 2 Dec 2015 10:18:26 +0100 Subject: add rationale and man page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 14 +++++++++-- README | 10 ++++++-- doc/man/auto-auto-complete.1 | 59 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 4 deletions(-) create mode 100644 doc/man/auto-auto-complete.1 diff --git a/Makefile b/Makefile index f5c4dce..136bc4e 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,10 @@ DATADIR = $(PREFIX)$(DATA) DOCDIR = $(DATADIR)/doc # The info manual documentation path including prefix INFODIR = $(DATADIR)/info +# The man page documentation path including prefix +MANDIR = $(DATADIR)/man +# The man page section 1 path including prefix +MAN1DIR = $(MANDIR)/man1 # The license base path including prefix LICENSEDIR = $(DATADIR)/licenses @@ -109,7 +113,7 @@ bin/auto-auto-complete.fish: src/completion bin/auto-auto-complete # Install rules .PHONY: install -install: install-base install-examples install-info install-shell +install: install-base install-examples install-info install-man install-shell .PHONY: install install-all: install-base install-doc install-shell @@ -132,7 +136,7 @@ install-license: # Install documentation .PHONY: install-doc -install-doc: install-examples install-info install-pdf install-ps install-dvi +install-doc: install-examples install-info install-pdf install-ps install-dvi install-man .PHONY: install-examples install-examples: doc/example @@ -159,6 +163,11 @@ install-dvi: bin/auto-auto-complete.dvi install -dm755 -- "$(DESTDIR)$(DOCDIR)" install -m644 $< -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)/$(PKGNAME).dvi" +.PHONY: install-man +install-man: doc/man/auto-auto-complete.1 + install -dm755 -- "$(DESTDIR)$(DOCDIR)" + install -m644 $< -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1" + # Install shell auto-completion .PHONY: install-shell @@ -192,6 +201,7 @@ uninstall: -rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)/$(PKGNAME).ps" -rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)/$(PKGNAME).dvi" -rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)/example" + -rm -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1" -rmdir -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME)" -rm -- "$(DESTDIR)$(DATADIR)/fish/completions/$(COMMAND).fish" -rmdir -- "$(DESTDIR)$(DATADIR)/fish/completions" diff --git a/README b/README index 531920c..afaee77 100644 --- a/README +++ b/README @@ -8,12 +8,18 @@ SYNOPSIS DESCRIPTION auto-auto-complete generates a shell auto-completion script for the shell SHELL, from the file SOURCE, and stores it to OUTPUT. - Or, if --where is used, print to stdout, where such generate - file should be stored for the command COMMAND, and the shell SHELL. + Or, if --where is used, print to stdout where such generate + file installed be stored for the command COMMAND, and the shell + SHELL. When generating a file, a series of variables can defined using the argument pattern 'VARIABLE=VALUE'. +RATIONALE + Noone really wants to write shell auto-completion scripts, + especially not for more than one shell. But of course we + want to have it. + SEE ALSO bash-completion, bash(1), fish(1), zsh(1) diff --git a/doc/man/auto-auto-complete.1 b/doc/man/auto-auto-complete.1 new file mode 100644 index 0000000..9c79c26 --- /dev/null +++ b/doc/man/auto-auto-complete.1 @@ -0,0 +1,59 @@ +.TH AUTO-AUTO-COMPLETE 1 AUTO-AUTO-COMPLETE +.SH NAME +auto-auto-complete - Autogenerate shell auto-completion scripts +.SH SYNOPSIS +.B auto-auto-complete +.I SHELL +.B \-\-output +.I OUTPUT +.B \-\-source +.I SOURCE +.RI [ VARIABLE \fB=\fP VALUE ]... +.br +.B auto-auto-complete +.I SHELL +.B \-\-where +.I COMMAND +.SH DESCRIPTION +.B auto-auto-complete +generates a shell auto-completion script for the shell +.IR SHELL , +from the file +.IR SOURCE , +and stores it to +.IR OUTPUT . +Or, if +.B \-\-where +is used, print to stdout where such generate file should +be installed for the command +.IR COMMAND , +and the shell +.IR SHELL . +.PP +When generating a file, a series of variables can defined +using the argument pattern \(aq'\fIVARIABLE\fP\fB=\fP\fIVALUE\fP\(aq. +.SH RATIONALE +Noone really wants to write shell auto-completion scripts, +especially not for more than one shell. But of course we +want to have it. +.SH "SEE ALSO" +.BR bash-completion , +.BR bash (1), +.BR fish (1), +.BR zsh (1) +.PP +Full documentation available locally via: info \(aq(auto-auto-complete)\(aq +.SH AUTHORS +Principal author, Mattias Andrée. See the COPYING file for the full +list of authors. +.SH LICENSE +Copyright \(co 2013, 2015 Mattias Andrée +.br +License GPLv3+: GNU GPL version 3 or later . +.br +This is free software: you are free to change and redistribute it. +.br +There is NO WARRANTY, to the extent permitted by law. +.SH BUGS +Please report bugs to https://github.com/maandree/auto-auto-complete/issues or to +maandree@member.fsf.org -- cgit v1.2.3-70-g09d2