gdb: support --args style completion (Alioth: #314664)
This commit is contained in:
parent
13ad1f1966
commit
b1f7803556
@ -2,9 +2,18 @@
|
|||||||
|
|
||||||
_gdb()
|
_gdb()
|
||||||
{
|
{
|
||||||
local cur prev words cword
|
local cur prev words cword i
|
||||||
_init_completion || return
|
_init_completion || return
|
||||||
|
|
||||||
|
# gdb [options] --args executable-file [inferior-arguments ...]
|
||||||
|
for (( i=1; i < cword; i++ )); do
|
||||||
|
if [[ "${words[i]}" == --args ]]; then
|
||||||
|
_command_offset $((i+1))
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# gdb [options] [executable-file [core-file or process-id]]
|
||||||
if [[ $cword -eq 1 ]]; then
|
if [[ $cword -eq 1 ]]; then
|
||||||
local IFS
|
local IFS
|
||||||
compopt -o filenames
|
compopt -o filenames
|
||||||
|
Loading…
x
Reference in New Issue
Block a user