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