-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to override autorun for clink? #663
Comments
Are you asking how CMD.exe works? Are you looking for the |
No, I made an ms-dos joke profile that uses cmd.exe and I am trying to find
the argument to turn clink off for that profile.
…On Sun, Aug 18, 2024 at 12:58 PM Chris Antos ***@***.***> wrote:
Are you asking how CMD.exe works? Are you looking for the exit command?
If so, this has nothing to do with Clink.
—
Reply to this email directly, view it on GitHub
<#663 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4SFQULD3X3QCKD6DQ2JNHTZSDHC7AVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMZDKOBXGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I want it to look "authentic"
…On Sun, Aug 18, 2024 at 1:26 PM Reid Burton ***@***.***> wrote:
No, I made an ms-dos joke profile that uses cmd.exe and I am trying to
find the argument to turn clink off for that profile.
On Sun, Aug 18, 2024 at 12:58 PM Chris Antos ***@***.***>
wrote:
> Are you asking how CMD.exe works? Are you looking for the exit command?
> If so, this has nothing to do with Clink.
>
> —
> Reply to this email directly, view it on GitHub
> <#663 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/A4SFQULD3X3QCKD6DQ2JNHTZSDHC7AVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMZDKOBXGI>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
(I use it w/ oh-my-posh cuz the wiki said to install clink to use it)
…On Sun, Aug 18, 2024 at 1:26 PM Reid Burton ***@***.***> wrote:
I want it to look "authentic"
On Sun, Aug 18, 2024 at 1:26 PM Reid Burton ***@***.***> wrote:
> No, I made an ms-dos joke profile that uses cmd.exe and I am trying to
> find the argument to turn clink off for that profile.
>
> On Sun, Aug 18, 2024 at 12:58 PM Chris Antos ***@***.***>
> wrote:
>
>> Are you asking how CMD.exe works? Are you looking for the exit command?
>> If so, this has nothing to do with Clink.
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#663 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/A4SFQULD3X3QCKD6DQ2JNHTZSDHC7AVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMZDKOBXGI>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***>
>>
>
|
Oh, you have Clink configured for AutoRun so that it gets injected into every There are several ways to temporarily disable Clink after it's been injected. Here are three examples:
If you replace your existing oh-my-posh Lua script with the following script, then you can turn off oh-my-posh in future sessions by running Alternative oh-my-posh.lua script: settings.add("ohmyposh.enable", false, "Enable oh-my-posh prompt filter.", "Takes effect on next session.")
settings.add("ohmyposh.theme", "", "The oh-my-posh theme to use.")
settings.add("ohmyposh.exepath", "", "Path to oh-my-posh program.", "Specifies where to find the oh-my-posh program.\nCan be used when it isn't on the system search PATH.") -- luacheck: no max line length
if not settings.get("ohmyposh.enable") then
if rl.getbinding then
if rl.getbinding(' ') == '"luafunc:ohmyposh_space"' then
rl.setbinding(' ', 'self-insert')
end
end
return
end
local init_script = os.getenv("CLINK_OHMYPOSH_INIT_SCRIPT")
if init_script then
loadfile(init_script)()
else
local theme = settings.get("ohmyposh.theme") or ""
if theme ~= "" then
theme = ' -c "' .. theme .. '"'
end
local exe = settings.get("ohmyposh.exepath")
if not exe or exe == "" then
exe ="oh-my-posh.exe"
end
local script = io.popen('2>nul "' .. exe .. '" init cmd' .. theme):read("*a")
if script == "" then
print('Unable to get oh-my-posh script from "' .. exe .. '".')
else
load(script)()
end
end |
How do I configure the autorun to use noclink.cmd?
…On Sun, Aug 18, 2024 at 1:50 PM Chris Antos ***@***.***> wrote:
Oh, you have Clink configured for AutoRun so that it gets injected into
every cmd.exe, but you want to be able to disable Clink sometimes.
There are several ways to temporarily disable Clink after it's been
injected.
Here are three examples:
- You can set CLINK_NOAUTORUN=1 and then start cmd.exe, and the new
instance of cmd.exe will not have Clink.
- You can use the noclink.cmd script that comes with clink-gizmos
<https://github.com/chrisant996/clink-gizmos> to disable the prompt
filtering.
- You could use a more sophisticated Lua script for loading
oh-my-posh, which could define a setting for enabling/disabling oh-my-posh.
The oh-my-posh instructions don't mention that, because it's more
complicated than the tiny simple script in the instructions.
If you replace your existing oh-my-posh Lua script with the following
script, then you can turn off oh-my-posh in *future* sessions by running clink
set ohmyposh.enable false. It can't disable oh-my-posh in the current
session, because the scripts built into oh-my-posh don't support that --
but it's something you could request in the oh-my-posh repo.
*Alternative oh-my-posh.lua script:*
settings.add("ohmyposh.enable", false, "Enable oh-my-posh prompt filter.", "Takes effect on next session.")settings.add("ohmyposh.theme", "", "The oh-my-posh theme to use.")settings.add("ohmyposh.exepath", "", "Path to oh-my-posh program.", "Specifies where to find the oh-my-posh program.\nCan be used when it isn't on the system search PATH.") -- luacheck: no max line length
if not settings.get("ohmyposh.enable") then
if rl.getbinding then
if rl.getbinding(' ') == '"luafunc:ohmyposh_space"' then
rl.setbinding(' ', 'self-insert')
end
end
returnend
local init_script = os.getenv("CLINK_OHMYPOSH_INIT_SCRIPT")if init_script then
loadfile(init_script)()else
local theme = settings.get("ohmyposh.theme") or ""
if theme ~= "" then
theme = ' -c "' .. theme .. '"'
end
local exe = settings.get("ohmyposh.exepath")
if not exe or exe == "" then
exe ="oh-my-posh.exe"
end
local script = io.popen('2>nul "' .. exe .. '" init cmd' .. theme):read("*a")
if script == "" then
print('Unable to get oh-my-posh script from "' .. exe .. '".')
else
load(script)()
endend
—
Reply to this email directly, view it on GitHub
<#663 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I put it in the same directory as the normal clink scripts
…On Sun, Aug 18, 2024 at 1:57 PM Reid Burton ***@***.***> wrote:
How do I configure the autorun to use noclink.cmd?
On Sun, Aug 18, 2024 at 1:50 PM Chris Antos ***@***.***>
wrote:
> Oh, you have Clink configured for AutoRun so that it gets injected into
> every cmd.exe, but you want to be able to disable Clink sometimes.
>
> There are several ways to temporarily disable Clink after it's been
> injected.
>
> Here are three examples:
>
> - You can set CLINK_NOAUTORUN=1 and then start cmd.exe, and the new
> instance of cmd.exe will not have Clink.
> - You can use the noclink.cmd script that comes with clink-gizmos
> <https://github.com/chrisant996/clink-gizmos> to disable the prompt
> filtering.
> - You could use a more sophisticated Lua script for loading
> oh-my-posh, which could define a setting for enabling/disabling oh-my-posh.
> The oh-my-posh instructions don't mention that, because it's more
> complicated than the tiny simple script in the instructions.
>
> If you replace your existing oh-my-posh Lua script with the following
> script, then you can turn off oh-my-posh in *future* sessions by running clink
> set ohmyposh.enable false. It can't disable oh-my-posh in the current
> session, because the scripts built into oh-my-posh don't support that --
> but it's something you could request in the oh-my-posh repo.
>
> *Alternative oh-my-posh.lua script:*
>
> settings.add("ohmyposh.enable", false, "Enable oh-my-posh prompt filter.", "Takes effect on next session.")settings.add("ohmyposh.theme", "", "The oh-my-posh theme to use.")settings.add("ohmyposh.exepath", "", "Path to oh-my-posh program.", "Specifies where to find the oh-my-posh program.\nCan be used when it isn't on the system search PATH.") -- luacheck: no max line length
> if not settings.get("ohmyposh.enable") then
> if rl.getbinding then
> if rl.getbinding(' ') == '"luafunc:ohmyposh_space"' then
> rl.setbinding(' ', 'self-insert')
> end
> end
> returnend
> local init_script = os.getenv("CLINK_OHMYPOSH_INIT_SCRIPT")if init_script then
> loadfile(init_script)()else
> local theme = settings.get("ohmyposh.theme") or ""
> if theme ~= "" then
> theme = ' -c "' .. theme .. '"'
> end
> local exe = settings.get("ohmyposh.exepath")
> if not exe or exe == "" then
> exe ="oh-my-posh.exe"
> end
> local script = io.popen('2>nul "' .. exe .. '" init cmd' .. theme):read("*a")
> if script == "" then
> print('Unable to get oh-my-posh script from "' .. exe .. '".')
> else
> load(script)()
> endend
>
> —
> Reply to this email directly, view it on GitHub
> <#663 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
as in clink.bat
…On Sun, Aug 18, 2024 at 1:59 PM Reid Burton ***@***.***> wrote:
I put it in the same directory as the normal clink scripts
On Sun, Aug 18, 2024 at 1:57 PM Reid Burton ***@***.***> wrote:
> How do I configure the autorun to use noclink.cmd?
>
> On Sun, Aug 18, 2024 at 1:50 PM Chris Antos ***@***.***>
> wrote:
>
>> Oh, you have Clink configured for AutoRun so that it gets injected into
>> every cmd.exe, but you want to be able to disable Clink sometimes.
>>
>> There are several ways to temporarily disable Clink after it's been
>> injected.
>>
>> Here are three examples:
>>
>> - You can set CLINK_NOAUTORUN=1 and then start cmd.exe, and the new
>> instance of cmd.exe will not have Clink.
>> - You can use the noclink.cmd script that comes with clink-gizmos
>> <https://github.com/chrisant996/clink-gizmos> to disable the prompt
>> filtering.
>> - You could use a more sophisticated Lua script for loading
>> oh-my-posh, which could define a setting for enabling/disabling oh-my-posh.
>> The oh-my-posh instructions don't mention that, because it's more
>> complicated than the tiny simple script in the instructions.
>>
>> If you replace your existing oh-my-posh Lua script with the following
>> script, then you can turn off oh-my-posh in *future* sessions by
>> running clink set ohmyposh.enable false. It can't disable oh-my-posh in
>> the current session, because the scripts built into oh-my-posh don't
>> support that -- but it's something you could request in the oh-my-posh repo.
>>
>> *Alternative oh-my-posh.lua script:*
>>
>> settings.add("ohmyposh.enable", false, "Enable oh-my-posh prompt filter.", "Takes effect on next session.")settings.add("ohmyposh.theme", "", "The oh-my-posh theme to use.")settings.add("ohmyposh.exepath", "", "Path to oh-my-posh program.", "Specifies where to find the oh-my-posh program.\nCan be used when it isn't on the system search PATH.") -- luacheck: no max line length
>> if not settings.get("ohmyposh.enable") then
>> if rl.getbinding then
>> if rl.getbinding(' ') == '"luafunc:ohmyposh_space"' then
>> rl.setbinding(' ', 'self-insert')
>> end
>> end
>> returnend
>> local init_script = os.getenv("CLINK_OHMYPOSH_INIT_SCRIPT")if init_script then
>> loadfile(init_script)()else
>> local theme = settings.get("ohmyposh.theme") or ""
>> if theme ~= "" then
>> theme = ' -c "' .. theme .. '"'
>> end
>> local exe = settings.get("ohmyposh.exepath")
>> if not exe or exe == "" then
>> exe ="oh-my-posh.exe"
>> end
>> local script = io.popen('2>nul "' .. exe .. '" init cmd' .. theme):read("*a")
>> if script == "" then
>> print('Unable to get oh-my-posh script from "' .. exe .. '".')
>> else
>> load(script)()
>> endend
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#663 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***>
>>
>
|
or where is clink_no autorun?
…On Sun, Aug 18, 2024 at 2:00 PM Reid Burton ***@***.***> wrote:
as in clink.bat
On Sun, Aug 18, 2024 at 1:59 PM Reid Burton ***@***.***> wrote:
> I put it in the same directory as the normal clink scripts
>
> On Sun, Aug 18, 2024 at 1:57 PM Reid Burton ***@***.***>
> wrote:
>
>> How do I configure the autorun to use noclink.cmd?
>>
>> On Sun, Aug 18, 2024 at 1:50 PM Chris Antos ***@***.***>
>> wrote:
>>
>>> Oh, you have Clink configured for AutoRun so that it gets injected into
>>> every cmd.exe, but you want to be able to disable Clink sometimes.
>>>
>>> There are several ways to temporarily disable Clink after it's been
>>> injected.
>>>
>>> Here are three examples:
>>>
>>> - You can set CLINK_NOAUTORUN=1 and then start cmd.exe, and the new
>>> instance of cmd.exe will not have Clink.
>>> - You can use the noclink.cmd script that comes with clink-gizmos
>>> <https://github.com/chrisant996/clink-gizmos> to disable the prompt
>>> filtering.
>>> - You could use a more sophisticated Lua script for loading
>>> oh-my-posh, which could define a setting for enabling/disabling oh-my-posh.
>>> The oh-my-posh instructions don't mention that, because it's more
>>> complicated than the tiny simple script in the instructions.
>>>
>>> If you replace your existing oh-my-posh Lua script with the following
>>> script, then you can turn off oh-my-posh in *future* sessions by
>>> running clink set ohmyposh.enable false. It can't disable oh-my-posh
>>> in the current session, because the scripts built into oh-my-posh don't
>>> support that -- but it's something you could request in the oh-my-posh repo.
>>>
>>> *Alternative oh-my-posh.lua script:*
>>>
>>> settings.add("ohmyposh.enable", false, "Enable oh-my-posh prompt filter.", "Takes effect on next session.")settings.add("ohmyposh.theme", "", "The oh-my-posh theme to use.")settings.add("ohmyposh.exepath", "", "Path to oh-my-posh program.", "Specifies where to find the oh-my-posh program.\nCan be used when it isn't on the system search PATH.") -- luacheck: no max line length
>>> if not settings.get("ohmyposh.enable") then
>>> if rl.getbinding then
>>> if rl.getbinding(' ') == '"luafunc:ohmyposh_space"' then
>>> rl.setbinding(' ', 'self-insert')
>>> end
>>> end
>>> returnend
>>> local init_script = os.getenv("CLINK_OHMYPOSH_INIT_SCRIPT")if init_script then
>>> loadfile(init_script)()else
>>> local theme = settings.get("ohmyposh.theme") or ""
>>> if theme ~= "" then
>>> theme = ' -c "' .. theme .. '"'
>>> end
>>> local exe = settings.get("ohmyposh.exepath")
>>> if not exe or exe == "" then
>>> exe ="oh-my-posh.exe"
>>> end
>>> local script = io.popen('2>nul "' .. exe .. '" init cmd' .. theme):read("*a")
>>> if script == "" then
>>> print('Unable to get oh-my-posh script from "' .. exe .. '".')
>>> else
>>> load(script)()
>>> endend
>>>
>>> —
>>> Reply to this email directly, view it on GitHub
>>> <#663 (comment)>,
>>> or unsubscribe
>>> <https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ>
>>> .
>>> You are receiving this because you authored the thread.Message ID:
>>> ***@***.***>
>>>
>>
|
if i define the no autorun variable will it only run if i enter the clink
command?
…On Sun, Aug 18, 2024 at 1:50 PM Chris Antos ***@***.***> wrote:
Oh, you have Clink configured for AutoRun so that it gets injected into
every cmd.exe, but you want to be able to disable Clink sometimes.
There are several ways to temporarily disable Clink after it's been
injected.
Here are three examples:
- You can set CLINK_NOAUTORUN=1 and then start cmd.exe, and the new
instance of cmd.exe will not have Clink.
- You can use the noclink.cmd script that comes with clink-gizmos
<https://github.com/chrisant996/clink-gizmos> to disable the prompt
filtering.
- You could use a more sophisticated Lua script for loading
oh-my-posh, which could define a setting for enabling/disabling oh-my-posh.
The oh-my-posh instructions don't mention that, because it's more
complicated than the tiny simple script in the instructions.
If you replace your existing oh-my-posh Lua script with the following
script, then you can turn off oh-my-posh in *future* sessions by running clink
set ohmyposh.enable false. It can't disable oh-my-posh in the current
session, because the scripts built into oh-my-posh don't support that --
but it's something you could request in the oh-my-posh repo.
*Alternative oh-my-posh.lua script:*
settings.add("ohmyposh.enable", false, "Enable oh-my-posh prompt filter.", "Takes effect on next session.")settings.add("ohmyposh.theme", "", "The oh-my-posh theme to use.")settings.add("ohmyposh.exepath", "", "Path to oh-my-posh program.", "Specifies where to find the oh-my-posh program.\nCan be used when it isn't on the system search PATH.") -- luacheck: no max line length
if not settings.get("ohmyposh.enable") then
if rl.getbinding then
if rl.getbinding(' ') == '"luafunc:ohmyposh_space"' then
rl.setbinding(' ', 'self-insert')
end
end
returnend
local init_script = os.getenv("CLINK_OHMYPOSH_INIT_SCRIPT")if init_script then
loadfile(init_script)()else
local theme = settings.get("ohmyposh.theme") or ""
if theme ~= "" then
theme = ' -c "' .. theme .. '"'
end
local exe = settings.get("ohmyposh.exepath")
if not exe or exe == "" then
exe ="oh-my-posh.exe"
end
local script = io.popen('2>nul "' .. exe .. '" init cmd' .. theme):read("*a")
if script == "" then
print('Unable to get oh-my-posh script from "' .. exe .. '".')
else
load(script)()
endend
—
Reply to this email directly, view it on GitHub
<#663 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
if so, how do i define it?
…On Sun, Aug 18, 2024 at 2:08 PM Reid Burton ***@***.***> wrote:
if i define the no autorun variable will it only run if i enter the clink
command?
On Sun, Aug 18, 2024 at 1:50 PM Chris Antos ***@***.***>
wrote:
> Oh, you have Clink configured for AutoRun so that it gets injected into
> every cmd.exe, but you want to be able to disable Clink sometimes.
>
> There are several ways to temporarily disable Clink after it's been
> injected.
>
> Here are three examples:
>
> - You can set CLINK_NOAUTORUN=1 and then start cmd.exe, and the new
> instance of cmd.exe will not have Clink.
> - You can use the noclink.cmd script that comes with clink-gizmos
> <https://github.com/chrisant996/clink-gizmos> to disable the prompt
> filtering.
> - You could use a more sophisticated Lua script for loading
> oh-my-posh, which could define a setting for enabling/disabling oh-my-posh.
> The oh-my-posh instructions don't mention that, because it's more
> complicated than the tiny simple script in the instructions.
>
> If you replace your existing oh-my-posh Lua script with the following
> script, then you can turn off oh-my-posh in *future* sessions by running clink
> set ohmyposh.enable false. It can't disable oh-my-posh in the current
> session, because the scripts built into oh-my-posh don't support that --
> but it's something you could request in the oh-my-posh repo.
>
> *Alternative oh-my-posh.lua script:*
>
> settings.add("ohmyposh.enable", false, "Enable oh-my-posh prompt filter.", "Takes effect on next session.")settings.add("ohmyposh.theme", "", "The oh-my-posh theme to use.")settings.add("ohmyposh.exepath", "", "Path to oh-my-posh program.", "Specifies where to find the oh-my-posh program.\nCan be used when it isn't on the system search PATH.") -- luacheck: no max line length
> if not settings.get("ohmyposh.enable") then
> if rl.getbinding then
> if rl.getbinding(' ') == '"luafunc:ohmyposh_space"' then
> rl.setbinding(' ', 'self-insert')
> end
> end
> returnend
> local init_script = os.getenv("CLINK_OHMYPOSH_INIT_SCRIPT")if init_script then
> loadfile(init_script)()else
> local theme = settings.get("ohmyposh.theme") or ""
> if theme ~= "" then
> theme = ' -c "' .. theme .. '"'
> end
> local exe = settings.get("ohmyposh.exepath")
> if not exe or exe == "" then
> exe ="oh-my-posh.exe"
> end
> local script = io.popen('2>nul "' .. exe .. '" init cmd' .. theme):read("*a")
> if script == "" then
> print('Unable to get oh-my-posh script from "' .. exe .. '".')
> else
> load(script)()
> endend
>
> —
> Reply to this email directly, view it on GitHub
> <#663 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
nvmind i can just tweak my profile args
…On Sun, Aug 18, 2024 at 2:08 PM Reid Burton ***@***.***> wrote:
if so, how do i define it?
On Sun, Aug 18, 2024 at 2:08 PM Reid Burton ***@***.***> wrote:
> if i define the no autorun variable will it only run if i enter the clink
> command?
>
> On Sun, Aug 18, 2024 at 1:50 PM Chris Antos ***@***.***>
> wrote:
>
>> Oh, you have Clink configured for AutoRun so that it gets injected into
>> every cmd.exe, but you want to be able to disable Clink sometimes.
>>
>> There are several ways to temporarily disable Clink after it's been
>> injected.
>>
>> Here are three examples:
>>
>> - You can set CLINK_NOAUTORUN=1 and then start cmd.exe, and the new
>> instance of cmd.exe will not have Clink.
>> - You can use the noclink.cmd script that comes with clink-gizmos
>> <https://github.com/chrisant996/clink-gizmos> to disable the prompt
>> filtering.
>> - You could use a more sophisticated Lua script for loading
>> oh-my-posh, which could define a setting for enabling/disabling oh-my-posh.
>> The oh-my-posh instructions don't mention that, because it's more
>> complicated than the tiny simple script in the instructions.
>>
>> If you replace your existing oh-my-posh Lua script with the following
>> script, then you can turn off oh-my-posh in *future* sessions by
>> running clink set ohmyposh.enable false. It can't disable oh-my-posh in
>> the current session, because the scripts built into oh-my-posh don't
>> support that -- but it's something you could request in the oh-my-posh repo.
>>
>> *Alternative oh-my-posh.lua script:*
>>
>> settings.add("ohmyposh.enable", false, "Enable oh-my-posh prompt filter.", "Takes effect on next session.")settings.add("ohmyposh.theme", "", "The oh-my-posh theme to use.")settings.add("ohmyposh.exepath", "", "Path to oh-my-posh program.", "Specifies where to find the oh-my-posh program.\nCan be used when it isn't on the system search PATH.") -- luacheck: no max line length
>> if not settings.get("ohmyposh.enable") then
>> if rl.getbinding then
>> if rl.getbinding(' ') == '"luafunc:ohmyposh_space"' then
>> rl.setbinding(' ', 'self-insert')
>> end
>> end
>> returnend
>> local init_script = os.getenv("CLINK_OHMYPOSH_INIT_SCRIPT")if init_script then
>> loadfile(init_script)()else
>> local theme = settings.get("ohmyposh.theme") or ""
>> if theme ~= "" then
>> theme = ' -c "' .. theme .. '"'
>> end
>> local exe = settings.get("ohmyposh.exepath")
>> if not exe or exe == "" then
>> exe ="oh-my-posh.exe"
>> end
>> local script = io.popen('2>nul "' .. exe .. '" init cmd' .. theme):read("*a")
>> if script == "" then
>> print('Unable to get oh-my-posh script from "' .. exe .. '".')
>> else
>> load(script)()
>> endend
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#663 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***>
>>
>
|
thanks! |
You'd use the CLINK_NOAUTORUN environment variable the way I said in the earlier comment: set CLINK_NOAUTORUN=1
start cmd.exe
All that CLINK_NOAUTORUN does is make the autorun script do nothing. Everything else works as usual. Refer to Using Clink for details on how to start Clink.
In a If the script's directory isn't in the system PATH (it probably won't be), then you need to give the full path to it. |
I cannot find a command to close this.
The text was updated successfully, but these errors were encountered: