Skip to content

Commit

Permalink
completions/fish: use @@Prefix@@
Browse files Browse the repository at this point in the history
  • Loading branch information
classabbyamp committed Apr 13, 2023
1 parent a5d67fa commit eb725c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ xmirror
.help
_site/
completions/_xmirror
completions/xmirror.fish
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ xmirror: xmirror.in
chmod +x $@+
mv $@+ $@

completions: completions/_xmirror
completions: completions/_xmirror completions/xmirror.fish

completions/%: completions/%.in
sed -e "s,@@PREFIX@@,$(PREFIX),g" $< >$@
Expand All @@ -25,7 +25,7 @@ install: all
install -Dm 644 xmirror.1 -t $(DESTDIR)$(PREFIX)/share/man/man1

clean:
rm -rf xmirror _site completions/_xmirror
rm -rf xmirror _site completions/_xmirror completions/xmirror.fish

README: xmirror.1
mandoc -Tutf8 $< | col -bx >$@
Expand Down
2 changes: 1 addition & 1 deletion completions/xmirror.fish → completions/xmirror.fish.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
complete -c xmirror -f

function __xmirror_complete_mirrors
string match -vr '^\s*#' </usr/share/xmirror/mirrors.lst | while read -l line
string match -vr '^\s*#' <@@PREFIX@@/share/xmirror/mirrors.lst | while read -l line
set -l values (string split \t -- $line)
# Mirror url, location, and tier
echo -- $values[2]\t$values[3], Tier $values[4]
Expand Down

0 comments on commit eb725c9

Please sign in to comment.