From 967cf1852d87efd737b5f2d8e2f44374c2ec5e01 Mon Sep 17 00:00:00 2001 From: Lazarus Lazaridis Date: Mon, 5 Mar 2018 22:09:48 +0200 Subject: [PATCH] Fallback for compopt in macOS. --- goto.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/goto.bash b/goto.bash index ef061b8..92251f2 100644 --- a/goto.bash +++ b/goto.bash @@ -207,14 +207,14 @@ function _complete_goto_aliases() if [ "${#matches[@]}" -eq "1" ]; then # remove the filenames attribute from the completion method - compopt +o filenames + compopt +o filenames 2>/dev/null # if you find only one alias don't append the directory COMPREPLY=$(printf ${matches[0]} | sed 's/[\t ].*//') else for i in "${!matches[@]}"; do # remove the filenames attribute from the completion method - compopt +o filenames + compopt +o filenames 2>/dev/null matches[$i]="$(echo ${matches[$i]} | sed 's/[\t]/ /g')" matches[$i]=$(printf '%*s' "-$COLUMNS" "${matches[$i]}")