Skip to content

Commit 9d75489

Browse files
author
Zachary Elliott
committed
Merge branch 'release/0.3.2'
2 parents 1c6c5ee + e6939b8 commit 9d75489

File tree

9 files changed

+81
-3
lines changed

9 files changed

+81
-3
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SUBDIRS = src doc
1+
SUBDIRS = src doc extra

configure.ac

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
AC_PREREQ([2.69])
55

6-
AC_INIT([pdf2laser], [0.3.1], [https://github.com/zellio/pdf2laser/issues], [pdf2laser])
6+
AC_INIT([pdf2laser], [0.3.2], [https://github.com/zellio/pdf2laser/issues], [pdf2laser])
77
AM_INIT_AUTOMAKE([-Wall])
88
AC_CONFIG_SRCDIR([src/pdf2laser.c])
99
AC_CONFIG_HEADERS([config.h])
@@ -28,6 +28,10 @@ AC_CHECK_FUNCS([alarm gethostname inet_ntoa socket sqrt strchr strdup strncasecm
2828

2929
AC_CONFIG_FILES([src/Makefile
3030
doc/Makefile
31+
extra/Makefile
32+
extra/completion/Makefile
33+
extra/completion/bash/Makefile
34+
extra/completion/zsh/Makefile
3135
Makefile])
3236

3337
AC_OUTPUT

extra/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SUBDIRS = completion

extra/completion/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SUBDIRS = bash zsh

extra/completion/bash/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bash_completion_dir = $(sysconfdir)/bash_completion.d
2+
bash_completion__DATA = pdf2laser

extra/completion/bash/pdf2laser

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#compdef pdf2laser
2+
3+
_pdf2laser()
4+
{
5+
local cur prev opts
6+
7+
COMPREPLY=()
8+
9+
cur="${COMP_WORDS[COMP_CWORD]}"
10+
prev="${COMP_WORDS[COMP_CWORD-1]}"
11+
12+
short_opts="-a -n -p -P -d -m -r -R -s -O -f -v -V -D -h"
13+
long_opts="--autofocus --job --printer --preset --dpi --mode \
14+
--raster-speed --raster-power --screen-size --no-optimize --frequency \
15+
--vector-speed --vector-power --debug --help --version"
16+
17+
case "${prev}" in
18+
-j|--job|-p|--printer|-P|--preset|-d|--dpi|-r|--raster-speed|\
19+
-R|--raster-power|-s|--screen-size|-f|--frequency|\
20+
-v|--vector-speed|-V|--vector-power)
21+
22+
# Stop completion on the flags that need arguments.
23+
24+
return 0
25+
;;
26+
-m|--mode)
27+
COMPREPLY=( $(compgen -W "mono grey colour" -- ${cur}) )
28+
return 0
29+
;;
30+
*)
31+
if [[ ${cur} == --* ]]; then
32+
COMPREPLY=( $(compgen -W "${long_opts}" -- ${cur}) )
33+
return 0
34+
elif [[ ${cur} == -* ]]; then
35+
COMPREPLY=( $(compgen -W "${short_opts}" -- ${cur}) )
36+
return 0
37+
fi
38+
39+
COMPREPLY=( $(compgen -f -d -- "${cur}") )
40+
return 0
41+
;;
42+
esac
43+
}
44+
45+
complete -F _pdf2laser pdf2laser

extra/completion/zsh/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
zsh_completion_dir = $(datarootdir)/zsh/site-functions
2+
zsh_completion__DATA = _pdf2laser

extra/completion/zsh/_pdf2laser

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#compdef pdf2laser
2+
3+
local args
4+
args=(
5+
'(autofocus)'{--autofocus,-a}'[Enable autofocus]'
6+
'(job)'{--job=,-n+}'[Set display name of print job]'
7+
'(printer)'{--printer=,-p+}'[IP Address of target printer]'
8+
'(preset)'{--preset=,-P+}'[Select a default preset]'
9+
'(dpi)'{--dpi=,-d+}'[Resolution of the raster]'
10+
'(mode)'{--mode=,-m+}'[Mode of the raster (default mono)]':'raster mode':'(mono grey colour)'
11+
'(raster-speed)'{--raster-speed=,-r+}'[Raster speed (0-100)]'
12+
'(raster-power)'{--raster-power=,-R+}'[Raster power (0-100)]'
13+
'(screen-size)'{--size=,-s+}'[Photograph screen size (default 8)]'
14+
'(optimize)'{--no-optimize,-O}'[Disable vector optimization]'
15+
'(frequency)'{--frequency=,-f+}'[Vector frequency]'
16+
'(vector-speed)'{--vector-speed=,-v+}'[Vector speed (0-100)]'
17+
'(vector-power)'{--vector-power=,-V+}'[Vector power (0-100)]'
18+
'(debug)'{--debug,-D}'[Enable debugging]'
19+
'(help)'{--help,-h}'[Output usage message and exit]'
20+
'--version[Output the version number and exit]'
21+
)
22+
23+
_arguments -Ss $args[@]

src/pdf2laser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Trammell Hudson <[email protected]>
1212
// Zachary Elliott <[email protected]>
1313
// URL: https://github.com/zellio/pdf2laser
14-
// Version: 0.3.1
14+
// Version: 0.3.2
1515

1616
/// Commentary:
1717

0 commit comments

Comments
 (0)