completion: get rid of empty COMPREPLY assignments
There's no functional reason for those, the only purpose they are supposed to serve is to say "we don't provide any words here", but even for that it's not used consistently. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
cdbff7d6ad
commit
0285118e59
@ -208,7 +208,6 @@ __gitcomp ()
|
|||||||
|
|
||||||
case "$cur_" in
|
case "$cur_" in
|
||||||
--*=)
|
--*=)
|
||||||
COMPREPLY=()
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
@ -614,7 +613,6 @@ __git_complete_remote_or_refspec ()
|
|||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
push) no_complete_refspec=1 ;;
|
push) no_complete_refspec=1 ;;
|
||||||
fetch)
|
fetch)
|
||||||
COMPREPLY=()
|
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
@ -630,7 +628,6 @@ __git_complete_remote_or_refspec ()
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $no_complete_refspec = 1 ]; then
|
if [ $no_complete_refspec = 1 ]; then
|
||||||
COMPREPLY=()
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
[ "$remote" = "." ] && remote=
|
[ "$remote" = "." ] && remote=
|
||||||
@ -951,7 +948,6 @@ _git_am ()
|
|||||||
"
|
"
|
||||||
return
|
return
|
||||||
esac
|
esac
|
||||||
COMPREPLY=()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_git_apply ()
|
_git_apply ()
|
||||||
@ -971,7 +967,6 @@ _git_apply ()
|
|||||||
"
|
"
|
||||||
return
|
return
|
||||||
esac
|
esac
|
||||||
COMPREPLY=()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_git_add ()
|
_git_add ()
|
||||||
@ -1031,7 +1026,6 @@ _git_bisect ()
|
|||||||
__gitcomp_nl "$(__git_refs)"
|
__gitcomp_nl "$(__git_refs)"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
COMPREPLY=()
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -1175,7 +1169,6 @@ _git_clone ()
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_git_commit ()
|
_git_commit ()
|
||||||
@ -1359,7 +1352,6 @@ _git_fsck ()
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_git_gc ()
|
_git_gc ()
|
||||||
@ -1370,7 +1362,6 @@ _git_gc ()
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_git_gitk ()
|
_git_gitk ()
|
||||||
@ -1447,7 +1438,6 @@ _git_init ()
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_git_ls_files ()
|
_git_ls_files ()
|
||||||
@ -1583,7 +1573,6 @@ _git_mergetool ()
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
COMPREPLY=()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_git_merge_base ()
|
_git_merge_base ()
|
||||||
@ -1896,7 +1885,6 @@ _git_config ()
|
|||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
*.*)
|
*.*)
|
||||||
COMPREPLY=()
|
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -2277,7 +2265,6 @@ _git_remote ()
|
|||||||
__gitcomp "$c"
|
__gitcomp "$c"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
COMPREPLY=()
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -2393,8 +2380,6 @@ _git_stash ()
|
|||||||
*)
|
*)
|
||||||
if [ -z "$(__git_find_on_cmdline "$save_opts")" ]; then
|
if [ -z "$(__git_find_on_cmdline "$save_opts")" ]; then
|
||||||
__gitcomp "$subcommands"
|
__gitcomp "$subcommands"
|
||||||
else
|
|
||||||
COMPREPLY=()
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -2407,14 +2392,12 @@ _git_stash ()
|
|||||||
__gitcomp "--index --quiet"
|
__gitcomp "--index --quiet"
|
||||||
;;
|
;;
|
||||||
show,--*|drop,--*|branch,--*)
|
show,--*|drop,--*|branch,--*)
|
||||||
COMPREPLY=()
|
|
||||||
;;
|
;;
|
||||||
show,*|apply,*|drop,*|pop,*|branch,*)
|
show,*|apply,*|drop,*|pop,*|branch,*)
|
||||||
__gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list \
|
__gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list \
|
||||||
| sed -n -e 's/:.*//p')"
|
| sed -n -e 's/:.*//p')"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
COMPREPLY=()
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@ -2531,7 +2514,6 @@ _git_svn ()
|
|||||||
__gitcomp "--revision= --parent"
|
__gitcomp "--revision= --parent"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
COMPREPLY=()
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@ -2556,13 +2538,10 @@ _git_tag ()
|
|||||||
|
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
-m|-F)
|
-m|-F)
|
||||||
COMPREPLY=()
|
|
||||||
;;
|
;;
|
||||||
-*|tag)
|
-*|tag)
|
||||||
if [ $f = 1 ]; then
|
if [ $f = 1 ]; then
|
||||||
__gitcomp_nl "$(__git_tags)"
|
__gitcomp_nl "$(__git_tags)"
|
||||||
else
|
|
||||||
COMPREPLY=()
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Reference in New Issue
Block a user