Compare commits
1 Commits
dff42f5125
...
7a9eff94fa
Author | SHA1 | Date | |
---|---|---|---|
7a9eff94fa |
@ -8,7 +8,16 @@ alias build="build-dir --build"
|
||||
# command line arguments.
|
||||
if [ `uname` = Linux ]; then
|
||||
if [[ "`vim --version`" =~ "^VIM - Vi IMproved 8\.1.*$" ]]; then
|
||||
function vimdebug() { vim "+packadd termdebug" "+TermdebugCommand $*" }
|
||||
autoload -U regexp-replace
|
||||
function vimdebug() {
|
||||
# For each item in $* replace * and \* and then replace \ with \\
|
||||
local args=()
|
||||
for arg in "$@"; do
|
||||
regexp-replace arg '\*' '\\*'
|
||||
args+=($arg)
|
||||
done
|
||||
vim "+packadd termdebug" "+TermdebugCommand $args"
|
||||
}
|
||||
alias debug='vimdebug'
|
||||
elif which cgdb &> /dev/null; then
|
||||
alias debug='cgdb --args'
|
||||
@ -171,12 +180,5 @@ build-run() {
|
||||
# Build then debug a target residing in `~build/bin`.
|
||||
build-debug() {
|
||||
local target=$1; shift 1
|
||||
# For each item in $* replace * and \* and then replace \ with \\
|
||||
autoload -U regexp-replace
|
||||
local args=()
|
||||
for arg in "$@"; do
|
||||
regexp-replace arg '\*' '\\*'
|
||||
args+=($arg)
|
||||
done
|
||||
eval build $target && debug ~build/bin/$target $args
|
||||
eval build $target && debug ~build/bin/$target "$@"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user