From 51330a7d31bc0e3b90bc9ff04d1cc923a372ed66 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 1 Dec 2018 02:06:43 +1300 Subject: Simplify an array operation in `bd` completion --- bash/bash_completion.d/bd.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bash/bash_completion.d/bd.bash') diff --git a/bash/bash_completion.d/bd.bash b/bash/bash_completion.d/bd.bash index 86146a4e..1c1a40a8 100644 --- a/bash/bash_completion.d/bd.bash +++ b/bash/bash_completion.d/bd.bash @@ -10,7 +10,7 @@ _bd() { # Remove the last element in the array (the current directory) ((${#dirnames[@]})) || return 1 - dirnames=("${dirnames[@]:0:$((${#dirnames[@]}-1))}") + dirnames=("${dirnames[@]:0:${#dirnames[@]}-1}") # Add the matching dirnames to the reply local dirname -- cgit v1.2.3