chrisant996 / clink

Bash's powerful command line editing in cmd.exe
https://chrisant996.github.io/clink/
GNU General Public License v3.0
3.44k stars 135 forks source link

How to override autorun for clink? #663

Closed gameking2011 closed 3 weeks ago

gameking2011 commented 3 weeks ago

I cannot find a command to close this.

chrisant996 commented 3 weeks ago

Are you asking how CMD.exe works? Are you looking for the exit command? If so, this has nothing to do with Clink.

gameking2011 commented 3 weeks ago

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 https://github.com/chrisant996/clink/issues/663#issuecomment-2295325872, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SFQULD3X3QCKD6DQ2JNHTZSDHC7AVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMZDKOBXGI . You are receiving this because you authored the thread.Message ID: @.***>

gameking2011 commented 3 weeks ago

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 https://github.com/chrisant996/clink/issues/663#issuecomment-2295325872, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SFQULD3X3QCKD6DQ2JNHTZSDHC7AVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMZDKOBXGI . You are receiving this because you authored the thread.Message ID: @.***>

gameking2011 commented 3 weeks ago

(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 https://github.com/chrisant996/clink/issues/663#issuecomment-2295325872, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SFQULD3X3QCKD6DQ2JNHTZSDHC7AVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMZDKOBXGI . You are receiving this because you authored the thread.Message ID: @.***>

chrisant996 commented 3 weeks ago

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:

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
    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
gameking2011 commented 3 weeks ago

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 https://github.com/chrisant996/clink/issues/663#issuecomment-2295340024, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ . You are receiving this because you authored the thread.Message ID: @.***>

gameking2011 commented 3 weeks ago

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 https://github.com/chrisant996/clink/issues/663#issuecomment-2295340024, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ . You are receiving this because you authored the thread.Message ID: @.***>

gameking2011 commented 3 weeks ago

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 https://github.com/chrisant996/clink/issues/663#issuecomment-2295340024, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ . You are receiving this because you authored the thread.Message ID: @.***>

gameking2011 commented 3 weeks ago

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 https://github.com/chrisant996/clink/issues/663#issuecomment-2295340024, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ . You are receiving this because you authored the thread.Message ID: @.***>

gameking2011 commented 3 weeks ago

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 https://github.com/chrisant996/clink/issues/663#issuecomment-2295340024, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ . You are receiving this because you authored the thread.Message ID: @.***>

gameking2011 commented 3 weeks ago

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 https://github.com/chrisant996/clink/issues/663#issuecomment-2295340024, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ . You are receiving this because you authored the thread.Message ID: @.***>

gameking2011 commented 3 weeks ago

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 https://github.com/chrisant996/clink/issues/663#issuecomment-2295340024, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SFQUJN5L7ULIOVISZV2ULZSDNFZAVCNFSM6AAAAABMWQIFMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGM2DAMBSGQ . You are receiving this because you authored the thread.Message ID: @.***>

gameking2011 commented 3 weeks ago

thanks!

chrisant996 commented 3 weeks ago

where is clink_no autorun? how do i define it?

You'd use the CLINK_NOAUTORUN environment variable the way I said in the earlier comment:

set CLINK_NOAUTORUN=1
start cmd.exe

if i define the no autorun variable will it only run if i enter the clink command?

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.

How do I configure the autorun to use noclink.cmd?

In a cmd.exe where Clink is already running, you run the noclink.cmd script.

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.