summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.me>2019-04-07 17:17:40 -0400
committerMatan Kushner <hello@matchai.me>2019-04-07 17:17:40 -0400
commit3c07e284fe45333a1b2a2ec4d7d3ad93ac8b3847 (patch)
treecd21192d562e2df3fb8e6d405f2022298bed48aa /src
parentfdacd1cf28102412ef38500b79c0563f0239f4b0 (diff)
Add some clarifying documentation
Diffstat (limited to 'src')
-rw-r--r--src/modules/directory.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/directory.rs b/src/modules/directory.rs
index 794e23a14..750b981df 100644
--- a/src/modules/directory.rs
+++ b/src/modules/directory.rs
@@ -26,10 +26,6 @@ pub fn segment(_: &ArgMatches) -> Segment {
}
}
- // if let Love(tiff) = matan::Love(tiff) {
- // log tiff + matan + kimu + nimu + puku + owl fren + roomba fren + cactus fren + rumple
- // }
-
Segment {
value: String::from(dir_string),
style: Style::from(COLOR_DIR).bold(),
@@ -37,6 +33,7 @@ pub fn segment(_: &ArgMatches) -> Segment {
}
}
+/// Get the root directory of a git repo
fn get_repo_root(repo: Repository) -> PathBuf {
match repo.is_bare() {
// A bare repo will return its root path
@@ -46,6 +43,7 @@ fn get_repo_root(repo: Repository) -> PathBuf {
}
}
+/// Replace the home directory in the path with "~"
fn truncate_home(path: &PathBuf) -> Option<String> {
const HOME_SYMBOL: &str = "~";