aboutsummaryrefslogtreecommitdiffstats
path: root/misc/auto-completion/bash
diff options
context:
space:
mode:
Diffstat (limited to 'misc/auto-completion/bash')
-rw-r--r--misc/auto-completion/bash/nnn-completion.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/auto-completion/bash/nnn-completion.bash b/misc/auto-completion/bash/nnn-completion.bash
index 638df49..6b73d05 100644
--- a/misc/auto-completion/bash/nnn-completion.bash
+++ b/misc/auto-completion/bash/nnn-completion.bash
@@ -8,7 +8,7 @@
_nnn ()
{
COMPREPLY=()
- local IFS=$' \n'
+ local IFS=$'\n'
local cur=$2 prev=$3
local -a opts
opts=(
@@ -37,7 +37,7 @@ _nnn ()
COMPREPLY=( $(compgen -f -d -- "$cur") )
elif [[ $prev == -e ]]; then
local sessions_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/sessions
- COMPREPLY=( $(compgen -W "$(ls "$sessions_dir")" -- "$cur") )
+ COMPREPLY=( $(cd "$sessions_dir" && compgen -f -d -- "$cur") )
elif [[ $cur == -* ]]; then
COMPREPLY=( $(compgen -W "${opts[*]}" -- "$cur") )
else