File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ HOOKSDIR ?= $(PREFIX)/share/aurpublish
44ZCOMPDIR ?= $(PREFIX ) /share/zsh/site-functions
55MANS = doc/aurpublish.1
66BASHCOMPDIR ?= $(shell pkg-config bash-completion --variable=completionsdir || echo '/usr/share/bash-completion/completions')
7+ FISHCOMPDIR ?= $(PREFIX ) /share/fish/vendor_completions.d
78
89edit = sed -e 's|@HOOKSDIR@|$(HOOKSDIR ) |g'
910
@@ -26,8 +27,10 @@ install: all
2627 install -m755 * .hook ' $(DESTDIR)$(HOOKSDIR)/'
2728 install -dm755 ' $(DESTDIR)$(ZCOMPDIR)'
2829 install -dm755 ' $(DESTDIR)$(BASHCOMPDIR)'
30+ install -dm755 ' $(DESTDIR)$(FISHCOMPDIR)'
2931 install -m644 completion/$(NAME ) .zsh ' $(DESTDIR)$(ZCOMPDIR)/_$(NAME)'
3032 install -m644 completion/$(NAME ) .bash ' $(DESTDIR)$(BASHCOMPDIR)/$(NAME)'
33+ install -m644 completion/$(NAME ) .fish ' $(DESTDIR)$(FISHCOMPDIR)/$(NAME).fish'
3134 for manfile in $( MANS) ; do \
3235 install -Dm644 $$ manfile -t $(DESTDIR )$(PREFIX ) /share/man/man$$ {manfile## *.}; \
3336 done
Original file line number Diff line number Diff line change 1+ # aurpublish
2+
3+ set -l local_pkgs " (git ls-tree -d --name-only HEAD :/ 2>/dev/null)"
4+
5+ set -l all_pkgs
6+ # Try to get a pkg list from AUR helpers, otherwise ask pacman for foreign packages
7+ if type -q ' yay'
8+ set all_pkgs " (yay -Pc)"
9+ else if type -q ' paru'
10+ set all_pkgs " (paru -Pc | string replace ' ' \t)"
11+ else
12+ set all_pkgs " (pacman -Qqm)"
13+ end
14+
15+ set -l subcmds setup log
16+ complete -c aurpublish -n " not __fish_seen_subcommand_from $subcmds " -xa $local_pkgs -d ' Push a subtree to the AUR'
17+ complete -c aurpublish -n " not __fish_seen_subcommand_from $subcmds " -a setup \
18+ -d ' Install githooks to the repository'
19+ complete -c aurpublish -n " __fish_seen_subcommand_from setup" -x
20+ complete -c aurpublish -n " not __fish_seen_subcommand_from $subcmds " -a log \
21+ -d ' Wrapper for `git log`, substituting a package subtree for the revision/branch.'
22+ complete -c aurpublish -n " __fish_seen_subcommand_from log" -xa $local_pkgs
23+
24+ complete -c aurpublish -s p -ra $all_pkgs -d ' Instead of publishing, pull changes from the AUR'
25+ complete -c aurpublish -s s -l speedup -d ' Speedup future publishing by recording the subtree history during a push'
26+ complete -c aurpublish -s h -l help -d ' Prints a usage page'
27+
You can’t perform that action at this time.
0 commit comments