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

support starship with clink config prompt use starship #687

Open
NewUserHa opened this issue Oct 16, 2024 · 2 comments
Open

support starship with clink config prompt use starship #687

NewUserHa opened this issue Oct 16, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@NewUserHa
Copy link

NewUserHa commented Oct 16, 2024

since starship and oh-my-posh both are popular,
it would be good if support starship with clink config prompt use starship instead of manually creating a .lua file because oh-my-posh is already supported.

under the user\AppData\Local\clink, even changing starship.lua to starship.lua2 to temporarily disable the .lua, it still loads the script

@eblis
Copy link

eblis commented Oct 16, 2024

I added an environment variable for this:

-- starship.lua

enabled = os.getenv("STARSHIP")
if enabled then
	-- print("Starship is enabled")
	load(io.popen('starship init cmd'):read("*a"))()
else
	-- print("Starship is not enabled")
end	

But at the end of the day i found myself not using Starship as much as I thought I would

@chrisant996
Copy link
Owner

chrisant996 commented Oct 16, 2024

since starship and oh-my-posh both are popular, it would be good if support starship with clink config prompt use starship instead of manually creating a .lua file because oh-my-posh is already supported.

I've never used starship, because it seems to be more time consuming and complicated to configure than oh-my-posh. I didn't want to invest the extra time to learn it and test it.

Someone else is welcome to create and test such a script and contribute it through open source.

under the user\AppData\Local\clink, even changing starship.lua to starship.lua2 to temporarily disable the .lua, it still loads the script

Refer to issue #502.

You have Short File Names enabled on the computer. Since the file name "starship.lua2" is not an 8.3 filename, the OS creates a Short File Name for it, something like "starsh~1.lua", which matches the wildcard "*.lua".

Rename it to something like "starship.lua.txt" or something like that.

@chrisant996 chrisant996 added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants