Skip to content
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

init.bat always uses "npm" as window title #933

Closed
Daniel15 opened this issue Apr 27, 2016 · 4 comments
Closed

init.bat always uses "npm" as window title #933

Daniel15 opened this issue Apr 27, 2016 · 4 comments

Comments

@Daniel15
Copy link

In ConEmu settings → Main → Tab bar, I set the console tab template to %s. This uses the tab's title on the tab bar, rather than the process name (%n, which I believe is the default for cmder).

With this configuration, a regular cmd.exe tab will display cmd by default, and cmd - command when executing a command. However, the init.bat file provided with cmder results in the title always being set to npm. You can replicate this outside of ConEmu too, by opening cmd.exe and running:

set ConEmuDir=c:\apps\cmder\vendor\conemu-maximus5
C:\apps\cmder\vendor\init.bat

(replacing c:\apps\cmder\ with the right path)

Strangely I don't see npm mentioned anywhere in init.bat, so I can't work out where it's coming from.

@jorgeesquer
Copy link

I'm having the same problem and it's driving me a bit crazy. This line in init.bat is the culprit:

@"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config"

Then clink goes and makes a few npm-related calls:

vendor/clink-completions/coho.lua:        "npm-publish-tag",
vendor/clink-completions/coho.lua:        "npm-unpublish-nightly",
vendor/clink-completions/coho.lua:        "npm-link",
vendor/clink-completions/npm.lua:function get_npm_cache_location()
vendor/clink-completions/npm.lua:    local proc = io.popen("npm config get cache 2>nul")
vendor/clink-completions/npm.lua:local cached_modules = matchers.create_dirs_matcher(get_npm_cache_location()..'/*')
vendor/clink-completions/npm.lua:local npm_parser = parser({
vendor/clink-completions/npm.lua:clink.arg.register_parser("npm", npm_parser)
vendor/clink-completions/npm_prompt.lua:function npm_prompt_filter()
vendor/clink-completions/npm_prompt.lua:clink.prompt.register_filter(npm_prompt_filter, 40)

I've tried to override the title with RenameTab and title in multiple places, but so far I don't get the desired result. The title on the tab bar behaves correctly here, it's the little preview window in the taskbar that shows npm.

I'm using version 1.2.9.

@Daniel15
Copy link
Author

Good catch @jorgeesquer, I can repro just by running Clink using that same command. I cross-posted in the Clink repo in case it's a Clink issue: mridgers/clink#397

@vladimir-kotikov
Copy link
Contributor

@Daniel15, you probably can fix it by either switching to 1.3.0-pre at https://github.com/cmderdev/cmder/releases/tag/v1.3.0-pre or getting a latest version of clink-completions and unzipping it to your Cmder/vendor directory

@Daniel15
Copy link
Author

Thanks @vladimir-kotikov! Switching to clink-completions 0.2.2 fixes this issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants