From 8ea64e848a72c710c034026b5ac25b72cb1c4997 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Fri, 12 Aug 2022 08:01:24 +0530 Subject: [PATCH] Fix double forward slash in Bash completions --- CHANGELOG.md | 4 ++++ templates/bash.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 118ca9d..bbc0ae3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Zsh: allow `z` to navigate dirstack via `+n` and `-n`. - Fzf: improved preview window. +### Fixed + +- Bash: extra `/` in completions. + ## [0.8.2] - 2022-06-26 ### Changed diff --git a/templates/bash.txt b/templates/bash.txt index 175f5ba..cb44cef 100644 --- a/templates/bash.txt +++ b/templates/bash.txt @@ -127,7 +127,7 @@ if [[ ${BASH_VERSINFO[0]:-0} -eq 4 && ${BASH_VERSINFO[1]:-0} -ge 4 || ${BASH_VER # If there is only one argument, use `cd` completions. if [[ {{ "${#COMP_WORDS[@]}" }} -eq 2 ]]; then \builtin mapfile -t COMPREPLY < <( - \builtin compgen -A directory -S / -- "${COMP_WORDS[-1]}" || \builtin true + \builtin compgen -A directory -- "${COMP_WORDS[-1]}" || \builtin true ) # If there is a space after the last word, use interactive selection. elif [[ -z ${COMP_WORDS[-1]} ]]; then