diff --git a/src/lib/shell/variables/mod.rs b/src/lib/shell/variables/mod.rs
index 5816da5de8beb92074d9ae58b187cc3332a55326..292e4aab8d5f8870b04e3d9dd4e4378129cf9e4a 100644
--- a/src/lib/shell/variables/mod.rs
+++ b/src/lib/shell/variables/mod.rs
@@ -335,16 +335,18 @@ impl Variables {
                     return Some(oldpwd.to_string() + remainder);
                 }
             }
-            _ => {
-                match tilde_prefix.parse() {
-                    Ok(num) => if let Some(path) = dir_stack.dir_from_top(num) {
+            _ => match tilde_prefix.parse() {
+                Ok(num) => {
+                    if let Some(path) = dir_stack.dir_from_top(num) {
                         return Some(path.to_str().unwrap().to_string());
                     }
-                    Err(_) => if let Some(home) = self_sys::get_user_home(tilde_prefix) {
+                }
+                Err(_) => {
+                    if let Some(home) = self_sys::get_user_home(tilde_prefix) {
                         return Some(home + remainder);
                     }
                 }
-            }
+            },
         }
         None
     }