-
-
Notifications
You must be signed in to change notification settings - Fork 473
Expand file tree
/
Copy pathbuild-shell-completion.sh
More file actions
executable file
·25 lines (20 loc) · 840 Bytes
/
build-shell-completion.sh
File metadata and controls
executable file
·25 lines (20 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
cd "$(dirname "$0")"
source ./script/setup.sh
./script/install-dep.sh --complgen
rm -rf .shell-completion && mkdir -p \
.shell-completion/zsh \
.shell-completion/fish \
.shell-completion/bash
./.deps/cargo-root/bin/complgen aot ./grammar/commands-bnf-grammar.txt \
--zsh-script .shell-completion/zsh/_aerospace \
--fish-script .shell-completion/fish/aerospace.fish \
--bash-script .shell-completion/bash/aerospace
if ! (not-outdated-bash --version | grep -q 'version 5'); then
echo "bash version is too old. At least version 5 is required" > /dev/stderr
exit 1
fi
# Check basic syntax
zsh -c 'autoload -Uz compinit; compinit; source ./.shell-completion/zsh/_aerospace'
fish -c 'source ./.shell-completion/fish/aerospace.fish'
not-outdated-bash -c 'source ./.shell-completion/bash/aerospace'