reujab / silver

A cross-shell customizable powerline-like prompt with icons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

using with pwsh?

fdncred opened this issue · comments

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

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

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?

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

%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.

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"