Fix completions for alias fdfind in deb package for bash, zsh and fish.
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Closes #1888
authored by skane-lukas · committed by Lukas Elmlund · parent 40d8eb3 · Browse files · 6 files·+35 added−6 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+35 added−6 removed
- other:+35 added−6 removed
Provenance
- Commit
247a517- Tree
e9d3034- Author
skane-lukas <212542964+skane-lukas@users.noreply.github.com>- Committer
Lukas Elmlund <skane-lukas@users.noreply.github.com>- Parent
40d8eb3
6 files changed+35 added−6 removed
added:contrib/completion/_fdfind+2 added
1+#compdef fdfind2+_fd "$@"added:contrib/completion/fdfind.bash+8 added
12345678# Source fd completionssource /usr/share/bash-completion/completions/fd
if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then complete -F _fd -o nosort -o bashdefault -o default fdfindelse complete -F _fd -o bashdefault -o default fdfindfiadded:contrib/completion/fdfind.fish+1 added
1+complete -c fdfind --wraps fdmodified:scripts/create-deb.sh+5 added-4 removed
55 unmodified lines5657585960606162636462636465666768697065 unmodified lines55 unmodified linesinstall -Dm644 "LICENSE-APACHE" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/LICENSE-APACHE"install -Dm644 "CHANGELOG.md" "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/changelog"gzip -n --best "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/changelog"
# Create symlinks so fdfind can be used as well:# Create symlink and completions so fdfind can be used as well:ln -s "/usr/bin/fd" "${DPKG_DIR}/usr/bin/fdfind"ln -s './fd.bash' "${DPKG_DIR}/usr/share/bash-completion/completions/fdfind"ln -s './fd.fish' "${DPKG_DIR}/usr/share/fish/vendor_completions.d/fdfind.fish"ln -s './_fd' "${DPKG_DIR}/usr/share/zsh/vendor-completions/_fdfind"
install -Dm644 'autocomplete/fdfind.bash' "${DPKG_DIR}/usr/share/bash-completion/completions/fdfind"install -Dm644 'autocomplete/fdfind.fish' "${DPKG_DIR}/usr/share/fish/vendor_completions.d/fdfind.fish"install -Dm644 'autocomplete/_fdfind' "${DPKG_DIR}/usr/share/zsh/vendor-completions/_fdfind"
cat > "${DPKG_DIR}/usr/share/doc/${DPKG_BASENAME}/copyright" <<EOFFormat: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/Upstream-Name: fdSource: ${REPO}65 unmodified linesmodified:CHANGELOG.md+2 added
13 unmodified lines14 - #150615 - #166716 - #181317 18+- Fix completions for alias `fdfind` in deb release, see #1888 (@skane-lukas)19+20 ## Changes21 22 - Minimum required rust version has been increased to 1.90.0. Notably, this means dropping fully support for intel Mac and Windows 7.23 821 unmodified linesmodified:Makefile+17 added-2 removed
7 unmodified lines8 $(EXE): Cargo.toml src/**/*.rs9 cargo build --profile $(PROFILE) --locked10 11 .PHONY: completions12-completions: autocomplete/fd.bash autocomplete/fd.fish autocomplete/_fd.ps1 autocomplete/_fd12+completions: autocomplete/fd.bash autocomplete/fd.fish autocomplete/_fd.ps1 autocomplete/_fd autocomplete/_fdfind autocomplete/fdfind.bash autocomplete/fdfind.fish13 14 comp_dir=@mkdir -p autocomplete15 16 autocomplete/fd.bash: $(EXE)11 unmodified lines28 autocomplete/_fd: contrib/completion/_fd29 $(comp_dir)30 cp $< $@31 32+autocomplete/_fdfind: contrib/completion/_fdfind33+ $(comp_dir)34+ cp $< $@35+36+autocomplete/fdfind.bash: contrib/completion/fdfind.bash37+ $(comp_dir)38+ cp $< $@39+40+autocomplete/fdfind.fish: contrib/completion/fdfind.fish41+ $(comp_dir)42+ cp $< $@43+44 install: $(EXE) completions45 install -Dm755 $(EXE) $(DESTDIR)$(bindir)/fd46 install -Dm644 autocomplete/fd.bash $(DESTDIR)/$(datadir)/bash-completion/completions/$(exe_name)47 install -Dm644 autocomplete/fd.fish $(DESTDIR)/$(datadir)/fish/vendor_completions.d/$(exe_name).fish36- install -Dm644 autocomplete/_fd $(DESTDIR)/$(datadir)/zsh/site-functions/_$(exe_name)48+ install -Dm644 autocomplete/_fd $(DESTDIR)/$(datadir)/zsh/site-functions/_fd49+ install -Dm644 autocomplete/fdfind.bash $(DESTDIR)/$(datadir)/zsh/site-functions/fdfind.bash50+ install -Dm644 autocomplete/fdfind.fish $(DESTDIR)/$(datadir)/zsh/site-functions/fdfind.fish51+ install -Dm644 autocomplete/_fdfind $(DESTDIR)/$(datadir)/zsh/site-functions/_fdfind52 install -Dm644 doc/fd.1 $(DESTDIR)/$(datadir)/man/man1/$(exe_name).1