Skip to content

Qt Creator terminal integration #453

Closed Answered by chrisant996
cristianadam asked this question in Q&A
Discussion options

You must be logged in to vote

@cristianadam Oh! It's even easier! Since Qt Creator only wants exit code and cwd, that's already fully possible with Clink as-is, for probably at least a year.

Instead of using a prompt filter, just use onbeginedit:

local function send_codes()
    local codes = ""
    codes = codes .. "\027]633;D;" .. os.geterrorlevel() .. "\a" -- send command exit code
    codes = codes .. "\027]633;P;Cwd=" .. os.getcwd() .. "\a" -- send cwd as title
    clink.print(codes, NONL)
end

clink.onbeginedit(send_codes)

And use the example .cmd script from the earlier reply to load the Lua script.

Replies: 3 comments 12 replies

Comment options

You must be logged in to vote
11 replies
@cristianadam
Comment options

@chrisant996
Comment options

@cristianadam
Comment options

@chrisant996
Comment options

Answer selected by chrisant996
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@chrisant996
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants