summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatherine Noll <noll.catherine@gmail.com>2021-03-28 21:27:25 -0400
committerCatherine Noll <noll.catherine@gmail.com>2021-03-28 21:42:01 -0400
commit8353527d5b08d7ef5f531337b3d6d1b8ed291ff0 (patch)
tree250b723a0a17c414b995892066188cd7df92e62f
parentfb77406bf0294ab405d57594e955524db6f469be (diff)
Display themes alphabetically when using --show-themes
-rw-r--r--src/options/get.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/options/get.rs b/src/options/get.rs
index 6542fd8e..b907ee88 100644
--- a/src/options/get.rs
+++ b/src/options/get.rs
@@ -57,6 +57,7 @@ pub fn get_themes(git_config: Option<git_config::GitConfig>) -> Vec<String> {
}
}
}
+ themes.sort_by(|a, b| a.to_lowercase().cmp(&b.to_lowercase()));
themes
}
@@ -330,7 +331,7 @@ pub mod tests {
assert_eq!(
themes,
- ["dark-theme", "light-theme", "light-and-dark-theme"]
+ ["dark-theme", "light-and-dark-theme", "light-theme",]
);
remove_file(git_config_path).unwrap();