Compare commits
1 Commits
7a9eff94fa
...
a095e9383c
Author | SHA1 | Date | |
---|---|---|---|
a095e9383c |
@ -8,7 +8,16 @@ alias build="build-dir --build"
|
|||||||
# command line arguments.
|
# command line arguments.
|
||||||
if [ `uname` = Linux ]; then
|
if [ `uname` = Linux ]; then
|
||||||
if [[ "`vim --version`" =~ "^VIM - Vi IMproved 8\.1.*$" ]]; 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'
|
alias debug='vimdebug'
|
||||||
elif which cgdb &> /dev/null; then
|
elif which cgdb &> /dev/null; then
|
||||||
alias debug='cgdb --args'
|
alias debug='cgdb --args'
|
||||||
@ -165,11 +174,11 @@ EOF
|
|||||||
# Build then run a target residing in `~build/bin`.
|
# Build then run a target residing in `~build/bin`.
|
||||||
build-run() {
|
build-run() {
|
||||||
local target=$1; shift 1
|
local target=$1; shift 1
|
||||||
eval build $target && ~build/bin/$target $*
|
eval build $target && ~build/bin/$target "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build then debug a target residing in `~build/bin`.
|
# Build then debug a target residing in `~build/bin`.
|
||||||
build-debug() {
|
build-debug() {
|
||||||
local target=$1; shift 1
|
local target=$1; shift 1
|
||||||
eval build $target && debug ~build/bin/$target $*
|
eval build $target && debug ~build/bin/$target "$@"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user