Skip to content

Commit

Permalink
feat: bash completion
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Aug 29, 2024
1 parent f85b3b7 commit d4e85a5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ parts:
uv-dev: bin/uv-dev
uvx: bin/uvx
lib*.so: lib/

completion:
plugin: nil
after: [uv]
override-build: |
"${CRAFT_STAGE}/bin/uv" generate-shell-completion bash > "${CRAFT_PART_INSTALL}/uv-completion.bash"
echo 'complete -F _uv -o bashdefault -o default astral-uv.uv' >> "${CRAFT_PART_INSTALL}/uv-completion.bash"
echo 'complete -F _uv -o bashdefault -o default uv' >> "${CRAFT_PART_INSTALL}/uv-completion.bash"
apps:
uv:
command: bin/uv
environment:
PATH: $SNAP/bin:$SNAP/usr/bin:$PATH
completer: uv-completion.bash
uv-dev:
command: bin/uv-dev
environment:
Expand Down

0 comments on commit d4e85a5

Please sign in to comment.