reujab / silver

A cross-shell customizable powerline-like prompt with icons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

silver's dir block panics when the folder current working directory gets deleted

dcermak opened this issue · comments

The directory block panics when the current working directory gets deleted:

$ grep -i silver .bashrc
export SILVER_SHELL=bash
SILVER=(user:green:black dir:blue:black git:green:black:yellow virtualenv:white:black time:5e8d87:black status:red:black)
eval "$(silver init)"
dan@Boreas  /tmp  9:12PM  mkdir -p test && cd test/
dan@Boreas  /tmp/test  9:13PM  rmdir /tmp/test
dan@Boreas  /tmp/test  9:13PM  ll
total 0
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

My main issue here is not the panic per-se, but that you end up with a non-functioning shell. In "vanilla" bash you can still cd into an existing directory, but with the silver prompt active you have to kill the current shell.

Nevertheless, still an awesome prompt: 10/10 will continue to use it ;-)