aboutsummaryrefslogtreecommitdiffstats
path: root/src/commands.rs
diff options
context:
space:
mode:
authorJae-Heon Ji <32578710+jaeheonji@users.noreply.github.com>2022-04-29 21:46:23 +0900
committerGitHub <noreply@github.com>2022-04-29 21:46:23 +0900
commit510964ecbcc6d61da0de5850670dbf899c25080a (patch)
treed17b7ecdcaad867b4f36887919d299b208e2612c /src/commands.rs
parentdocs(changelog): saved cursor position on resize (diff)
downloadsl0ppij-510964ecbcc6d61da0de5850670dbf899c25080a.tar.gz
sl0ppij-510964ecbcc6d61da0de5850670dbf899c25080a.tar.xz
sl0ppij-510964ecbcc6d61da0de5850670dbf899c25080a.zip
fix: change the way sessions are sorted (#1347)
* chore: add TODO comment * feat: change the sort method to mtime
Diffstat (limited to 'src/commands.rs')
-rw-r--r--src/commands.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands.rs b/src/commands.rs
index f940e76c..e66a1b20 100644
--- a/src/commands.rs
+++ b/src/commands.rs
@@ -2,8 +2,8 @@ use crate::install::populate_data_dir;
use crate::sessions::kill_session as kill_session_impl;
use crate::sessions::{
assert_session, assert_session_ne, get_active_session, get_sessions,
- get_sessions_sorted_by_creation_date, print_sessions, print_sessions_with_index,
- session_exists, ActiveSession,
+ get_sessions_sorted_by_mtime, print_sessions, print_sessions_with_index, session_exists,
+ ActiveSession,
};
use dialoguer::Confirm;
use std::path::PathBuf;
@@ -114,7 +114,7 @@ fn find_indexed_session(
fn attach_with_session_index(config_options: Options, index: usize, create: bool) -> ClientInfo {
// Ignore the session_name when `--index` is provided
- match get_sessions_sorted_by_creation_date() {
+ match get_sessions_sorted_by_mtime() {
Ok(sessions) if sessions.is_empty() => {
if create {
create_new_client()