reujab / silver

A cross-shell customizable powerline-like prompt with icons
MIT License
453 stars 30 forks source link

using with pwsh? #61

Closed fdncred closed 3 years ago

fdncred commented 3 years ago

I was going to try silver out but I'm having problems. I did a cargo install silver and then init like this.

Invoke-Expression -Command $(silver init | Out-String)
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', C:\Users\username\.cargo\registry\src\github.com-1ecc6299db9ec823\silver-1.1.0\src\main.rs:57:55
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Invoke-Expression: Cannot bind argument to parameter 'Command' because it is an empty string.

any ideas what's going on?

Windows 10 Windows Terminal

thecaralice commented 3 years ago

Try installing it via cargo install --git https://github.com/reujab/silver

fdncred commented 3 years ago

I fixed my problem late last night by changing main.rs like this.

                "powershell" | "pwsh" | "powershell.exe" | "pwsh.exe" => include_str!("init.ps1"),

But now I'm having problems finding the right place to put the config file. I thought I had figured it out by looking at the directories documentation but it's still not being read. Any clue where to put the config file in Windows?

thecaralice commented 3 years ago

%appdata%/roaming/silver/silver.toml I guess

fdncred commented 3 years ago

%appdata% resolves to users/username/appdata/roaming already so I put it in users/username/appdata/roaming/silver/silver.toml but it doesn't see it. not sure why.

fdncred commented 3 years ago

after fixing the issue in #63 I found that the path for the config flie is really "C:\Users\username\AppData\Roaming\silver\config\silver.toml"