comments
This commit is contained in:
parent
e8216e7c08
commit
309021fb68
@ -28,10 +28,10 @@ pub fn info() -> Option<(String, String)> {
|
||||
|
||||
pub fn repo_name(path: &str) -> String {
|
||||
Path::new(path)
|
||||
.file_name()
|
||||
.and_then(|name| name.to_str())
|
||||
.unwrap_or("") // Default value if None
|
||||
.to_string() // Convert &str to String
|
||||
.file_name() // Extracts the last component of the path.
|
||||
.and_then(|name| name.to_str()) // Converts the `OsStr` to `&str`.
|
||||
.unwrap_or("") // Default value(empty string) if None(no valid name)
|
||||
.to_string() // Converts &str to String
|
||||
}
|
||||
|
||||
//Git branch indicator
|
||||
|
@ -46,7 +46,6 @@ fn main() {
|
||||
components.push(user::indicator());
|
||||
}
|
||||
if indicate_err {
|
||||
//components.push(error::indicator(cmd_args));
|
||||
components.push(error::indicator(&cmd_args));
|
||||
}
|
||||
if show_pwd {
|
||||
|
Loading…
Reference in New Issue
Block a user