Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ZLE widget to run gdb on command line
- X-seq: zsh-users 10805
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: ZLE widget to run gdb on command line
- Date: Fri, 06 Oct 2006 19:31:30 -0700
- In-reply-to: <20061006145222.GA32307@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20061006145222.GA32307@xxxxxxxxxxxxxxxx>
On Oct 6, 10:52am, Chris Johnson wrote:
}
} print -s ${(z)BUFFER}
} BUFFER="gdb !!0 -x =(echo run !!1*)"
} zle expand-history
} zle accept-line
This is a useful idea, but you have a whole function scope to play with.
No need to resort to expanding strings from the history.
set -- "${(@z)BUFFER}"
BUFFER="gdb $argv[1] -x =(print -r run ${(q)argv[2-]})"
zle accept-line
If you want the original line to appear in the history, insert
print -s -- "$@"
after the "set" command.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author