diff options
Diffstat (limited to 'src/key_command')
-rw-r--r-- | src/key_command/command.rs | 1 | ||||
-rw-r--r-- | src/key_command/constants.rs | 1 | ||||
-rw-r--r-- | src/key_command/impl_appcommand.rs | 1 | ||||
-rw-r--r-- | src/key_command/impl_appexecute.rs | 3 | ||||
-rw-r--r-- | src/key_command/impl_comment.rs | 1 | ||||
-rw-r--r-- | src/key_command/impl_from_str.rs | 5 |
6 files changed, 12 insertions, 0 deletions
diff --git a/src/key_command/command.rs b/src/key_command/command.rs index 4469ebe..626574e 100644 --- a/src/key_command/command.rs +++ b/src/key_command/command.rs @@ -93,6 +93,7 @@ pub enum Command { new_name: path::PathBuf, }, RenameFileAppend, + RenameFileAppendBase, RenameFilePrepend, RenameFileKeepExt, TouchFile { diff --git a/src/key_command/constants.rs b/src/key_command/constants.rs index 356997a..4510f55 100644 --- a/src/key_command/constants.rs +++ b/src/key_command/constants.rs @@ -53,6 +53,7 @@ cmd_constants![ (CMD_RELOAD_DIRECTORY_LIST, "reload_dirlist"), (CMD_RENAME_FILE, "rename"), (CMD_RENAME_FILE_APPEND, "rename_append"), + (CMD_RENAME_FILE_APPEND_BASE, "rename_append_base"), (CMD_RENAME_FILE_PREPEND, "rename_prepend"), (CMD_RENAME_FILE_KEEP_EXT, "rename_keep_ext"), (CMD_SEARCH_STRING, "search"), diff --git a/src/key_command/impl_appcommand.rs b/src/key_command/impl_appcommand.rs index 655ff64..d555db2 100644 --- a/src/key_command/impl_appcommand.rs +++ b/src/key_command/impl_appcommand.rs @@ -55,6 +55,7 @@ impl AppCommand for Command { Self::ReloadDirList => CMD_RELOAD_DIRECTORY_LIST, Self::RenameFile { .. } => CMD_RENAME_FILE, Self::RenameFileAppend => CMD_RENAME_FILE_APPEND, + Self::RenameFileAppendBase => CMD_RENAME_FILE_APPEND_BASE, Self::RenameFilePrepend => CMD_RENAME_FILE_PREPEND, Self::RenameFileKeepExt => CMD_RENAME_FILE_KEEP_EXT, diff --git a/src/key_command/impl_appexecute.rs b/src/key_command/impl_appexecute.rs index c4571ea..ba9c802 100644 --- a/src/key_command/impl_appexecute.rs +++ b/src/key_command/impl_appexecute.rs @@ -99,6 +99,9 @@ impl AppExecute for Command { Self::ReloadDirList => reload::reload_dirlist(context), Self::RenameFile { new_name } => rename_file::rename_file(context, new_name.as_path()), Self::RenameFileAppend => rename_file::rename_file_append(context, backend, keymap_t), + Self::RenameFileAppendBase => { + rename_file::rename_file_append_base(context, backend, keymap_t) + } Self::RenameFilePrepend => rename_file::rename_file_prepend(context, backend, keymap_t), Self::RenameFileKeepExt => { rename_file::rename_file_keep_ext(context, backend, keymap_t) diff --git a/src/key_command/impl_comment.rs b/src/key_command/impl_comment.rs index 9549621..9282146 100644 --- a/src/key_command/impl_comment.rs +++ b/src/key_command/impl_comment.rs @@ -85,6 +85,7 @@ impl CommandComment for Command { Self::RenameFile { .. } => "Rename file", Self::TouchFile { .. } => "Touch file", Self::RenameFileAppend => "Rename a file", + Self::RenameFileAppendBase => "Rename a file", Self::RenameFilePrepend => "Rename a file", Self::RenameFileKeepExt => "Rename a file", diff --git a/src/key_command/impl_from_str.rs b/src/key_command/impl_from_str.rs index 1080198..55a278e 100644 --- a/src/key_command/impl_from_str.rs +++ b/src/key_command/impl_from_str.rs @@ -83,6 +83,11 @@ impl std::str::FromStr for Command { simple_command_conversion_case!(command, CMD_RELOAD_DIRECTORY_LIST, Self::ReloadDirList); simple_command_conversion_case!(command, CMD_RENAME_FILE_APPEND, Self::RenameFileAppend); + simple_command_conversion_case!( + command, + CMD_RENAME_FILE_APPEND_BASE, + Self::RenameFileAppendBase + ); simple_command_conversion_case!(command, CMD_RENAME_FILE_PREPEND, Self::RenameFilePrepend); simple_command_conversion_case!(command, CMD_RENAME_FILE_KEEP_EXT, Self::RenameFileKeepExt); simple_command_conversion_case!(command, CMD_SEARCH_NEXT, Self::SearchNext); |