diff options
| author | Mel <einebeere@gmail.com> | 2021-10-01 00:34:16 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2021-10-01 00:34:16 +0200 |
| commit | 3f5c5026909af023c8a3885a4a3d97c669302c1b (patch) | |
| tree | 44c7e3e81d3b71ad6977afe4ac1596033b5834a6 /cli | |
| parent | 8f700551fd3f98c7b9846af647a7318c171152a6 (diff) | |
| download | ka-3f5c5026909af023c8a3885a4a3d97c669302c1b.tar.zst ka-3f5c5026909af023c8a3885a4a3d97c669302c1b.zip | |
Global repository cursor
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/src/main.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/src/main.rs b/cli/src/main.rs index 3b0203d..751871c 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -6,7 +6,8 @@ fn main() { let args: Vec<String> = env::args().collect(); let command = args[1].as_str(); - let options = ActionOptions::from_pwd().expect("Could not get current path."); + let options = ActionOptions::from_path("./repo"); + //let options = ActionOptions::from_pwd().expect("Could not get current path."); match command { "create" => { @@ -16,11 +17,9 @@ fn main() { update(options).expect("Failed executing Update action."); } "shift" => { - let file_path = args[2].as_str(); + let new_cursor: usize = args[2].as_str().parse().expect("Invalid cursor."); - let new_cursor: usize = args[3].as_str().parse().expect("Invalid cursor."); - - shift(options, file_path, new_cursor).expect("Failed executing Shift actions."); + shift(options, new_cursor).expect("Failed executing Shift actions."); } _ => panic!("Unknown command: {}", command), } |
