# HG changeset patch # User Oleksandr Gavenko # Date 1319898879 -10800 # Node ID 8963bce11ed5bc58c5126839cdf6b27514e49ed2 # Parent 70b18b0b9e5388a6ccabf7f3101ad93be4aee513 Start loop from 1st index as 0th index point to command name. diff -r 70b18b0b9e53 -r 8963bce11ed5 .bashrc --- a/.bashrc Sat Oct 29 17:31:06 2011 +0300 +++ b/.bashrc Sat Oct 29 17:34:39 2011 +0300 @@ -252,7 +252,7 @@ COMPREPLY=( $(compgen -f -- "$cur") ) return 0 fi - for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do + for (( i=1; i < ${#COMP_WORDS[@]}-1; i++ )); do if [[ ${COMP_WORDS[i]} == -f ]]; then mk=${COMP_WORDS[i+1]} break