Line wrapping issue with silver in termite (using bash)
tobip opened this issue · comments
- Does that happen without
silver
? - Does that happen in other terminal emulators?
- Does that happen with other shells?
- Please attach your config
I have observed this behavior with the Sakura terminal emulator on Fedora 32
The relevant portion of my .bashrc
:
if which silver &> /dev/null; then
SILVER=(env:white:black:USER dir:blue:white git:green:white status:red:white)
home_icon=$'\uf7db'
export SILVER_SHELL=$0
export SILVER_ICONS=nerd
export SILVER_DIR_ALIASES="$HOME:$home_icon "
eval "$(silver init)"
fi
I have observed this behavior with the Sakura terminal emulator on Fedora 32
The relevant portion of my
.bashrc
:if which silver &> /dev/null; then SILVER=(env:white:black:USER dir:blue:white git:green:white status:red:white) home_icon=$'\uf7db' export SILVER_SHELL=$0 export SILVER_ICONS=nerd export SILVER_DIR_ALIASES="$HOME:$home_icon " eval "$(silver init)" fi
Can't reproduce neither with latest crates.io release nor git version, Alacritty, Arch Linux
The relevant part in my .bashrc
seems to be
SILVER=(status:black:white user:yellow:black dir:blue:black git:green:black cmdtime:magenta:black)
export SILVER_ICONS=nerd
export SILVER_SHELL=$0 # bash, zsh, or fish
eval "$(silver init)"
After commenting out these lines the line wrapping works like intended.
Does it reproduce on the git version?
To use it:
-
Remove all
SILVER*
environment variables, leave onlysource <(silver init)
oreval "$(silver init)"
line -
Create
~/.config/silver/silver.toml
with the following contents:[[left]] name = "status" color.background = "black" color.foreground = "white" [[left]] name = "user" color.background = "yellow" color.foreground = "black" [[left]] name = "dir" color.background = "blue" color.foreground = "black" [[left]] name = "git" color.background = "green" color.foreground = "black" [[left]] name = "cmdtime" color.background = "magenta" color.foreground = "black"
-
cargo install --git https://github.com/reujab/silver
-
Restart bash
Alright, this is the result:
$ source .bashrc
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/main.rs:57:25
stack backtrace:
0: 0xaaaac6d38110 - <unknown>
1: 0xaaaac6d52550 - <unknown>
2: 0xaaaac6d35150 - <unknown>
3: 0xaaaac6d3a420 - <unknown>
4: 0xaaaac6d3a160 - <unknown>
5: 0xaaaac6d3aaa4 - <unknown>
6: 0xaaaac6d3a6bc - <unknown>
7: 0xaaaac6d51968 - <unknown>
8: 0xaaaac6d518ec - <unknown>
9: 0xaaaac6be8b64 - <unknown>
10: 0xaaaac6be3d54 - <unknown>
11: 0xaaaac6d3ae38 - <unknown>
12: 0xaaaac6be8c3c - <unknown>
13: 0xffff8f41f538 - __libc_start_main
14: 0xaaaac6be0fe4 - <unknown>
Can you try cargo install --git https://github.com/reujab/silver
again? Also maybe we should move to gitter
Thanks for your help!
Sorry, earlier I still had the original silver installed on my system.
I now removed that one, and re-installed the new version from git using your command.
After a first try everything seems to work like intended now.
Is it possible to revert the changes I made on my system (installing rust and compiling dozens of apps) and going back to install silver through the pamac package manager?
That way I can receive updates in the future...
AUR package is currently orphaned and a bit outdated, it's pretty hard to maintain it while doing other projects. Maybe if you find someone who could do that it would be possible, but rn cargo is the only way
Good, thank you!