This commit is contained in:
wzy 2025-02-22 20:15:38 +00:00 committed by GitHub
commit 7d88ff817c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 28 additions and 0 deletions

28
src/_cgdb Normal file
View File

@ -0,0 +1,28 @@
#compdef cgdb
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for cgdb (https://github.com/cgdb/cgdb).
# Modified from rejected https://github.com/cgdb/cgdb/pull/337/
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Wu, Zhenyu <wuzhenyu@ustc.edu>
#
# ------------------------------------------------------------------------------
# cgdb -- <TAB>
if ((${${words[1, CURRENT]}[(I)--]})) && [[ ${words[CURRENT]} != -- ]]; then
_gdb
# cgdb <TAB> or cgdb <TAB> -- or cgdb --<TAB>
else
_arguments -s \
"(- : *)"{-v,--version}"[Print version information and then exit.]" \
"(- : *)"{-h,--help}"[Print help (this message) and then exit.]" \
-d"[Set debugger to use.]" \
-w"[Wait for debugger to attach before starting.]" \
--
fi