Skip to content

Commit 37ac4f3

Browse files
committed
ditto
1 parent 0528383 commit 37ac4f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

etc/bash_completion.d/sambamba

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,20 @@ _sambamba()
5555
for word in ${COMP_WORDS[@]}; do
5656
if [[ $word == *.bam && $word != "" ]]; then
5757
eval abspath=$word
58-
COMPREPLY=( $(sambamba view -H $abspath | grep @SQ | \
58+
COMPREPLY=( $(sambamba view -H -t4 $abspath | grep @SQ | \
5959
cut -f 2 | cut -f2 -d: 2>/dev/null | grep "^$cur") )
6060
break
6161
fi
6262
done
63+
64+
if [[ ${#COMPREPLY[@]} == 0 ]]; then
65+
compopt +o nospace
66+
fi
67+
6368
compopt -o default
6469
compopt -o filenames
6570
else
71+
compopt +o nospace
6672
compopt -o default
6773
fi
6874
}

0 commit comments

Comments
 (0)