summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/event/action_map.rs2
-rw-r--r--src/event/event_exec.rs6
-rw-r--r--src/modes/edit/completion.rs12
-rw-r--r--src/modes/edit/leave_mode.rs4
-rw-r--r--src/modes/edit/menu.rs2
5 files changed, 13 insertions, 13 deletions
diff --git a/src/event/action_map.rs b/src/event/action_map.rs
index 3d3312a..1a96be7 100644
--- a/src/event/action_map.rs
+++ b/src/event/action_map.rs
@@ -139,7 +139,7 @@ impl ActionMap {
Self::FuzzyFindLine => EventAction::fuzzyfind_line(status),
Self::GoRoot => EventAction::go_root(status),
Self::GoStart => EventAction::go_start(status),
- Self::Cd => EventAction::goto(status),
+ Self::Cd => EventAction::cd(status),
Self::Help => EventAction::help(status, binds),
Self::History => EventAction::history(status),
Self::Home => EventAction::home(status),
diff --git a/src/event/event_exec.rs b/src/event/event_exec.rs
index 2902c84..d894d62 100644
--- a/src/event/event_exec.rs
+++ b/src/event/event_exec.rs
@@ -387,9 +387,9 @@ impl EventAction {
Ok(())
}
- /// Enter the goto mode where an user can type a path to jump to.
- pub fn goto(status: &mut Status) -> Result<()> {
- status.set_edit_mode(status.index, Edit::InputCompleted(InputCompleted::Goto))?;
+ /// Enter the cd mode where an user can type a path to jump to.
+ pub fn cd(status: &mut Status) -> Result<()> {
+ status.set_edit_mode(status.index, Edit::InputCompleted(InputCompleted::Cd))?;
status.menu.completion.reset();
Ok(())
}
diff --git a/src/modes/edit/completion.rs b/src/modes/edit/completion.rs
index 308eefd..3e11695 100644
--- a/src/modes/edit/completion.rs
+++ b/src/modes/edit/completion.rs
@@ -12,7 +12,7 @@ use crate::modes::Leave;
pub enum InputCompleted {
#[default]
/// Complete a directory path in filesystem
- Goto,
+ Cd,
/// Complete a filename from current directory
Search,
/// Complete an executable name from $PATH
@@ -27,7 +27,7 @@ impl fmt::Display for InputCompleted {
#[rustfmt::skip]
Self::Exec => write!(f, "Open with: "),
#[rustfmt::skip]
- Self::Goto => write!(f, "Go to: "),
+ Self::Cd => write!(f, "Cd: "),
#[rustfmt::skip]
Self::Search => write!(f, "Search: "),
#[rustfmt::skip]
@@ -131,10 +131,10 @@ impl Completion {
self.proposals.clear();
}
- /// Goto completion.
+ /// Cd completion.
/// Looks for the valid path completing what the user typed.
- pub fn goto(&mut self, input_string: &str, current_path: &str) -> Result<()> {
- self.goto_update_from_input(input_string, current_path);
+ pub fn cd(&mut self, input_string: &str, current_path: &str) -> Result<()> {
+ self.cd_update_from_input(input_string, current_path);
let (parent, last_name) = split_input_string(input_string);
if last_name.is_empty() {
return Ok(());
@@ -144,7 +144,7 @@ impl Completion {
Ok(())
}
- fn goto_update_from_input(&mut self, input_string: &str, current_path: &str) {
+ fn cd_update_from_input(&mut self, input_string: &str, current_path: &str) {
self.proposals = vec![];
if let Some(expanded_input) = self.expand_input(input_string) {
self.proposals.push(expanded_input);
diff --git a/src/modes/edit/leave_mode.rs b/src/modes/edit/leave_mode.rs
index 801780e..df2e370 100644
--- a/src/modes/edit/leave_mode.rs
+++ b/src/modes/edit/leave_mode.rs
@@ -67,7 +67,7 @@ impl LeaveMode {
Edit::Navigate(Navigate::RemovableDevices) => Ok(()),
Edit::InputCompleted(InputCompleted::Exec) => LeaveMode::exec(status),
Edit::InputCompleted(InputCompleted::Search) => LeaveMode::search(status),
- Edit::InputCompleted(InputCompleted::Goto) => LeaveMode::goto(status),
+ Edit::InputCompleted(InputCompleted::Cd) => LeaveMode::cd(status),
Edit::InputCompleted(InputCompleted::Action) => LeaveMode::action(status, binds),
// To avoid mistakes, the default answer is No. We do nothing here.
Edit::NeedConfirmation(_) => Ok(()),
@@ -264,7 +264,7 @@ impl LeaveMode {
/// The first completion proposition is used, `~` expansion is done.
/// If no result were found, no cd is done and we go back to normal mode
/// silently.
- pub fn goto(status: &mut Status) -> Result<()> {
+ pub fn cd(status: &mut Status) -> Result<()> {
if status.menu.completion.is_empty() {
return Ok(());
}
diff --git a/src/modes/edit/menu.rs b/src/modes/edit/menu.rs
index 8f8480c..1a7fa6d 100644
--- a/src/modes/edit/menu.rs
+++ b/src/modes/edit/menu.rs
@@ -114,7 +114,7 @@ impl Menu {
fn fill_completion(&mut self, tab: &Tab) -> Result<()> {
match tab.edit_mode {
- Edit::InputCompleted(InputCompleted::Goto) => self.completion.goto(
+ Edit::InputCompleted(InputCompleted::Cd) => self.completion.cd(
&self.input.string(),
&tab.directory.path.as_os_str().to_string_lossy(),
),