Skip to content

Commit caff244

Browse files
committed
help fn changes added bash completions and some refactoring
1 parent 67eb423 commit caff244

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

bash-completions

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
#!/bin/bash
21
# BASH COMPLETION SCRIPT FOR STANDARD_UNIX_NOTES notes(1) notebook(1)
32
# Original PASSWORD_STORE version Copyright (C) 2012 - 2014 Jason A. Donenfeld <[email protected]> and
43
# Brian Mattern <[email protected]>. All Rights Reserved.
54

5+
# Installed into
6+
# /usr/share/bash-completion/completions/notes
7+
# /usr/share/bash-completion/completions/notebook
8+
9+
610
_notes_complete_entries () {
711
if [ -n "$XDG_DATA_DIR" -a -z "$NOTESDIR" ] ; then
812
# only use $XDG_DATA_DIR if NOTESDIR not set

makefile

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ install_files:
3232
@echo do the install stuff
3333
sudo install -o root -m 755 notes /usr/local/bin/notes
3434
sudo ln -sf /usr/local/bin/notes /usr/local/bin/notebook
35+
sudo install -o root -m 644 bash-completions /usr/share/bash-completion/completions/notes
36+
sudo install -o root -m 644 bash-completions /usr/share/bash-completion/completions/notebook
3537

3638
manpages:
3739
@echo create the docs files to be installed
@@ -52,6 +54,8 @@ uninstall:
5254
-sudo rm -f /usr/share/man/man1/notebook.1.gz
5355
-sudo rm -f /usr/local/bin/notes
5456
-sudo rm -f /usr/local/bin/notebook
57+
-sudo rm -f /usr/share/bash-completion/completions/notes
58+
-sudo rm -f /usr/share/bash-completion/completions/notebook
5559

5660
## make reinstall Reinstall the application
5761
reinstall: uninstall install

pkgs/debian/makefile

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ MANPATH=usr/share/man/man1
66
PKGMANDIR=$(PKGBUILDDIR)/$(MANPATH)
77
PROGROOT=../..
88
DEBIAN=$(PKGBUILDDIR)/DEBIAN
9+
BASHCOMPLETE="usr/share/bash-completion/completions"
10+
PKGBASHCOMPLETE=$(PKGBUILDDIR)/$(BASHCOMPLETE)
911

1012
## make help: Show help
1113
help:
@@ -25,6 +27,7 @@ var:
2527
@echo MANPATH = $(MANPATH)
2628
@echo PKGMANDIR = $(PKGMANDIR)
2729
@echo PROGROOT = $(PROGROOT)
30+
@echo PKGBASHCOMPLETE = $(PKGBASHCOMPLETE)
2831

2932
## make build: Build .DEB package
3033
deb: clean prep build
@@ -39,9 +42,12 @@ prep: clean
3942
mkdir -p $(DEBIAN)
4043
mkdir -p $(PKGBINDIR)
4144
mkdir -p $(PKGMANDIR)
45+
mkdir -p $(PKGBASHCOMPLETE)
4246
sudo install -o root -m 755 $(PROGROOT)/notes $(PKGBINDIR)
4347
sudo install -o root -m 644 $(PROGROOT)/docs/notes.1 $(PKGMANDIR)
4448
sudo install -o root -m 644 $(PROGROOT)/docs/notebook.1 $(PKGMANDIR)
49+
sudo install -o root -m 644 $(PROGROOT)/bash-completions $(PKGBASHCOMPLETE)/notes
50+
sudo install -o root -m 644 $(PROGROOT)/bash-completions $(PKGBASHCOMPLETE)/notebook
4551
install control $(DEBIAN)
4652
cd $(PKGBINDIR); ln -sf notes notebook
4753

0 commit comments

Comments
 (0)