Signed-off-by: Ludovico Gerardi <
ludovico...@posteo.it>
---
contrib/{ => completions}/newsboat.fish | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename contrib/{ => completions}/newsboat.fish (100%)
diff --git a/contrib/newsboat.fish b/contrib/completions/newsboat.fish
similarity index 100%
rename from contrib/newsboat.fish
rename to contrib/completions/newsboat.fish
--
2.46.2
From 2b43d2ad2b1e0ee39c42cc489e5821deebe6c0a8 Mon Sep 17 00:00:00 2001
Message-ID: <
2b43d2ad2b1e0ee39c42cc489e5821deebe6...@posteo.it>
In-Reply-To: <
cover.1727722771.g...@posteo.it>
References: <
cover.1727722771.g...@posteo.it>
From: Ludovico Gerardi <
ludovico...@posteo.it>
Date: Mon, 30 Sep 2024 15:57:56 +0200
Subject: [PATCH 2/3] Install shell completions
To: Newsboat mailing list <
news...@googlegroups.com>
Signed-off-by: Ludovico Gerardi <
ludovico...@posteo.it>
---
Makefile | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index cf4631f1..811747f4 100644
--- a/Makefile
+++ b/Makefile
@@ -361,9 +361,9 @@ install-docs: doc
$(MKDIR) $(DESTDIR)$(docdir)
$(INSTALL) -m 644 doc/xhtml/* $(DESTDIR)$(docdir)
$(INSTALL) -m 644 CHANGELOG.md $(DESTDIR)$(docdir)
- find contrib/ -type d -print0 | xargs -0 -I@ $(MKDIR) $(DESTDIR)$(docdir)/@
- find contrib/ -type f -perm /0111 -print0 | xargs -0 -I@ install -m 755 @ $(DESTDIR)$(docdir)/@
- find contrib/ -type f ! -perm /0111 -print0 | xargs -0 -I@ install -m 644 @ $(DESTDIR)$(docdir)/@
+ find contrib/ -type d ! -wholename 'contrib/completions' -print0 | xargs -0 -I@ $(MKDIR) $(DESTDIR)$(docdir)/@
+ find contrib/ -type f ! -wholename 'contrib/completions*' -perm /0111 -print0 | xargs -0 -I@ install -m 755 @ $(DESTDIR)$(docdir)/@
+ find contrib/ -type f ! -wholename 'contrib/completions*' ! -perm /0111 -print0 | xargs -0 -I@ install -m 644 @ $(DESTDIR)$(docdir)/@
$(MKDIR) $(DESTDIR)$(mandir)/man1
$(INSTALL) -m 644 doc/$(NEWSBOAT).1 $(DESTDIR)$(mandir)/man1
$(INSTALL) -m 644 doc/$(PODBOAT).1 $(DESTDIR)$(mandir)/man1
@@ -378,7 +378,13 @@ install-icon:
$(MKDIR) $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
$(INSTALL) -m 644 logo.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/newsboat.svg
-install: install-newsboat install-podboat install-docs install-examples install-mo install-icon
+install-completions-fish:
+ $(MKDIR) $(DESTDIR)$(datadir)/fish/vendor_completions.d
+ $(INSTALL) -m 644 contrib/completions/newsboat.fish $(DESTDIR)$(datadir)/fish/vendor_completions.d
+
+install-completions: install-completions-fish
+
+install: install-newsboat install-podboat install-docs install-examples install-mo install-icon install-completions
uninstall: uninstall-mo
$(RM) $(DESTDIR)$(prefix)/bin/$(NEWSBOAT)
--
2.46.2
From a4fc92c89ebff582d027fd53059b574f3074dc7b Mon Sep 17 00:00:00 2001
Message-ID: <
a4fc92c89ebff582d027fd53059b574f3074...@posteo.it>
In-Reply-To: <
cover.1727722771.g...@posteo.it>
References: <
cover.1727722771.g...@posteo.it>
From: Ludovico Gerardi <
ludovico...@posteo.it>
Date: Mon, 30 Sep 2024 16:11:39 +0200
Subject: [PATCH 3/3] Add zsh completions
To: Newsboat mailing list <
news...@googlegroups.com>
Signed-off-by: Ludovico Gerardi <
ludovico...@posteo.it>
---
Makefile | 6 +++++-
contrib/completions/_newsboat | 27 +++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
create mode 100644 contrib/completions/_newsboat
diff --git a/Makefile b/Makefile
index 811747f4..e5ed26a4 100644
--- a/Makefile
+++ b/Makefile
@@ -382,7 +382,11 @@ install-completions-fish:
$(MKDIR) $(DESTDIR)$(datadir)/fish/vendor_completions.d
$(INSTALL) -m 644 contrib/completions/newsboat.fish $(DESTDIR)$(datadir)/fish/vendor_completions.d
-install-completions: install-completions-fish
+install-completions-zsh:
+ $(MKDIR) $(DESTDIR)$(datadir)/zsh/site-functions
+ $(INSTALL) -m 644 contrib/completions/_newsboat $(DESTDIR)$(datadir)/zsh/site-functions
+
+install-completions: install-completions-fish install-completions-zsh
install: install-newsboat install-podboat install-docs install-examples install-mo install-icon install-completions
diff --git a/contrib/completions/_newsboat b/contrib/completions/_newsboat
new file mode 100644
index 00000000..e459f26b
--- /dev/null
+++ b/contrib/completions/_newsboat
@@ -0,0 +1,27 @@
+#compdef newsboat
+
+_arguments : \
+ '(- *)'{-h,--help}'[display help]' \
+ '(- *)'{-v,-V,--version}'[get version information]' \
+ '(-q --quiet)'{-q,--quiet}'[quiet startup]' \
+ '(-r --refresh-on-start)'{-r,--refresh-on-start}'[refresh feeds on start]' \
+ '(-e --export-to-opml)'{-e,--export-to-opml}'[export feeds as OPML to stdout]' \
+ '--export-to-opml2[export feeds as OPML2 to stdout]' \
+ '(-X --vacuum)'{-X,--vacuum}'[compact the cache]' \
+ '--cleanup[remove unreferenced entries from the cache and quit]' \
+ '(-i --import-from-opml)'{-i,--import-from-opml=}'[import an OPML file]:OPML file:_files' \
+ '(-u --url-file)'{-u,--url-file=}'[use an alternative URL file]:URL file:_files' \
+ '(-c --cache-file)'{-c,--cache-file=}'[use an alternative cache file]:cache file:_files' \
+ '(-C --config-file)'{-C,--config-file=}'[use an alternative configuration file]:config file:_files' \
+ '--queue-file=[use an alternative queue file]:queue file:_files' \
+ '--search-history-file=[use an alternative search history file]:search history file:_files' \
+ '--cmdline-history-file=[use an alternative command line history file]:command line history file:_files' \
+ '(-x --execute)'{-x,--execute}'[execute commands]:commands:'\
+'((reload\:reload\ feed print-unread\:print\ unread\ articles))' \
+ '(-l --log-level)'{-l,--log-level}'[generate a logfile with specified loglevel]:level:(1 2 3 4 5 6)' \
+ '(-d --log-file)'{-d,--log-file=}'[use this logfile]:filename:_files' \
+ '(-E --export-to-file)'{-E,--export-to-file=}'[export a list of read articles]:filename:_files' \
+ '(-I --import-from-file)'{-I,--import-from-file=}'[import a list of read articles]:filename:_files'
+
+
+# vim: ft=zsh sw=2 ts=2 et
--
2.46.2