From b5872054f641bb417bd1ffc6a9ded1d95181b943 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 26 May 2026 07:01:40 +0200 Subject: no need to ship completions anymore! --- install.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 872118c..37a7021 100755 --- a/install.sh +++ b/install.sh @@ -28,28 +28,27 @@ fi echo "" echo "Installing shell completions..." -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" shell_name=$(basename "${SHELL:-}") case "$shell_name" in bash) dest="${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions" mkdir -p "$dest" - cp "$SCRIPT_DIR/completions/rsp.bash" "$dest/rsp" + /usr/bin/rsp completions bash > "$dest/rsp" echo " → Bash completions: $dest/rsp" ;; zsh) dest="/usr/share/zsh/site-functions/_rsp" - sudo cp "$SCRIPT_DIR/completions/rsp.zsh" "$dest" + /usr/bin/rsp completions zsh | sudo tee "$dest" > /dev/null echo " → Zsh completions: $dest" ;; fish) dest="$HOME/.config/fish/completions/rsp.fish" mkdir -p "$(dirname "$dest")" - cp "$SCRIPT_DIR/completions/rsp.fish" "$dest" + /usr/bin/rsp completions fish > "$dest" echo " → Fish completions: $dest" ;; *) - echo " → Unrecognized shell '$shell_name'; completion files are in $SCRIPT_DIR/completions/" + echo " → Unrecognized shell '$shell_name'; generate with: rsp completions " ;; esac -- cgit v1.2.3