summaryrefslogtreecommitdiffstats
path: root/src/strings.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings.rs')
-rw-r--r--src/strings.rs1872
1 files changed, 936 insertions, 936 deletions
diff --git a/src/strings.rs b/src/strings.rs
index 566fa24d..949cbed2 100644
--- a/src/strings.rs
+++ b/src/strings.rs
@@ -1,8 +1,8 @@
use crate::keys::SharedKeyConfig;
pub mod order {
- pub static NAV: i8 = 2;
- pub static RARE_ACTION: i8 = 1;
+ pub static NAV: i8 = 2;
+ pub static RARE_ACTION: i8 = 1;
}
pub static PUSH_POPUP_MSG: &str = "Push";
@@ -21,1095 +21,1095 @@ pub static PUSH_TAGS_STATES_PUSHING: &str = "pushing";
pub static PUSH_TAGS_STATES_DONE: &str = "done";
pub fn title_branches() -> String {
- "Branches".to_string()
+ "Branches".to_string()
}
pub fn title_tags() -> String {
- "Tags".to_string()
+ "Tags".to_string()
}
pub fn title_status(_key_config: &SharedKeyConfig) -> String {
- "Unstaged Changes".to_string()
+ "Unstaged Changes".to_string()
}
pub fn title_diff(_key_config: &SharedKeyConfig) -> String {
- "Diff: ".to_string()
+ "Diff: ".to_string()
}
pub fn title_index(_key_config: &SharedKeyConfig) -> String {
- "Staged Changes".to_string()
+ "Staged Changes".to_string()
}
pub fn tab_status(key_config: &SharedKeyConfig) -> String {
- format!("Status [{}]", key_config.get_hint(key_config.tab_status))
+ format!("Status [{}]", key_config.get_hint(key_config.tab_status))
}
pub fn tab_log(key_config: &SharedKeyConfig) -> String {
- format!("Log [{}]", key_config.get_hint(key_config.tab_log))
+ format!("Log [{}]", key_config.get_hint(key_config.tab_log))
}
pub fn tab_files(key_config: &SharedKeyConfig) -> String {
- format!("Files [{}]", key_config.get_hint(key_config.tab_files))
+ format!("Files [{}]", key_config.get_hint(key_config.tab_files))
}
pub fn tab_stashing(key_config: &SharedKeyConfig) -> String {
- format!(
- "Stashing [{}]",
- key_config.get_hint(key_config.tab_stashing)
- )
+ format!(
+ "Stashing [{}]",
+ key_config.get_hint(key_config.tab_stashing)
+ )
}
pub fn tab_stashes(key_config: &SharedKeyConfig) -> String {
- format!(
- "Stashes [{}]",
- key_config.get_hint(key_config.tab_stashes)
- )
+ format!(
+ "Stashes [{}]",
+ key_config.get_hint(key_config.tab_stashes)
+ )
}
pub fn tab_divider(_key_config: &SharedKeyConfig) -> String {
- " | ".to_string()
+ " | ".to_string()
}
pub fn cmd_splitter(_key_config: &SharedKeyConfig) -> String {
- " ".to_string()
+ " ".to_string()
}
pub fn msg_opening_editor(_key_config: &SharedKeyConfig) -> String {
- "opening editor...".to_string()
+ "opening editor...".to_string()
}
pub fn msg_title_error(_key_config: &SharedKeyConfig) -> String {
- "Error".to_string()
+ "Error".to_string()
}
pub fn commit_title() -> String {
- "Commit".to_string()
+ "Commit".to_string()
}
pub fn commit_title_merge() -> String {
- "Commit (Merge)".to_string()
+ "Commit (Merge)".to_string()
}
pub fn commit_title_amend() -> String {
- "Commit (Amend)".to_string()
+ "Commit (Amend)".to_string()
}
pub fn commit_msg(_key_config: &SharedKeyConfig) -> String {
- "type commit message..".to_string()
+ "type commit message..".to_string()
}
pub fn commit_first_line_warning(count: usize) -> String {
- format!("[subject length: {}]", count)
+ format!("[subject length: {}]", count)
}
pub const fn branch_name_invalid() -> &'static str {
- "[invalid name]"
+ "[invalid name]"
}
pub fn commit_editor_msg(_key_config: &SharedKeyConfig) -> String {
- r##"
+ r##"
# Edit your commit message
# Lines starting with '#' will be ignored"##
- .to_string()
+ .to_string()
}
pub fn stash_popup_title(_key_config: &SharedKeyConfig) -> String {
- "Stash".to_string()
+ "Stash".to_string()
}
pub fn stash_popup_msg(_key_config: &SharedKeyConfig) -> String {
- "type name (optional)".to_string()
+ "type name (optional)".to_string()
}
pub fn confirm_title_reset() -> String {
- "Reset".to_string()
+ "Reset".to_string()
}
pub fn confirm_title_stashdrop(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "Drop".to_string()
+ "Drop".to_string()
}
pub fn confirm_title_stashpop(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "Pop".to_string()
+ "Pop".to_string()
}
pub fn confirm_title_merge(
- _key_config: &SharedKeyConfig,
- rebase: bool,
+ _key_config: &SharedKeyConfig,
+ rebase: bool,
) -> String {
- if rebase {
- "Merge (via rebase)".to_string()
- } else {
- "Merge (via commit)".to_string()
- }
+ if rebase {
+ "Merge (via rebase)".to_string()
+ } else {
+ "Merge (via commit)".to_string()
+ }
}
pub fn confirm_msg_merge(
- _key_config: &SharedKeyConfig,
- incoming: usize,
- rebase: bool,
+ _key_config: &SharedKeyConfig,
+ incoming: usize,
+ rebase: bool,
) -> String {
- if rebase {
- format!("Rebase onto {} incoming commits?", incoming)
- } else {
- format!("Merge of {} incoming commits?", incoming)
- }
+ if rebase {
+ format!("Rebase onto {} incoming commits?", incoming)
+ } else {
+ format!("Merge of {} incoming commits?", incoming)
+ }
}
pub fn confirm_title_abortmerge() -> String {
- "Abort merge?".to_string()
+ "Abort merge?".to_string()
}
pub fn confirm_msg_abortmerge() -> String {
- "This will revert all uncommitted changes. Are you sure?"
- .to_string()
+ "This will revert all uncommitted changes. Are you sure?"
+ .to_string()
}
pub fn confirm_msg_reset() -> String {
- "confirm file reset?".to_string()
+ "confirm file reset?".to_string()
}
pub fn confirm_msg_reset_lines(lines: usize) -> String {
- format!(
- "are you sure you want to discard {} selected lines?",
- lines
- )
+ format!(
+ "are you sure you want to discard {} selected lines?",
+ lines
+ )
}
pub fn confirm_msg_stashdrop(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "confirm stash drop?".to_string()
+ "confirm stash drop?".to_string()
}
pub fn confirm_msg_stashpop(_key_config: &SharedKeyConfig) -> String {
- "The stash will be applied and removed from the stash list. Confirm stash pop?"
+ "The stash will be applied and removed from the stash list. Confirm stash pop?"
.to_string()
}
pub fn confirm_msg_resethunk(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "confirm reset hunk?".to_string()
+ "confirm reset hunk?".to_string()
}
pub fn confirm_title_delete_branch(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "Delete Branch".to_string()
+ "Delete Branch".to_string()
}
pub fn confirm_msg_delete_branch(
- _key_config: &SharedKeyConfig,
- branch_ref: &str,
+ _key_config: &SharedKeyConfig,
+ branch_ref: &str,
) -> String {
- format!("Confirm deleting branch: '{}' ?", branch_ref)
+ format!("Confirm deleting branch: '{}' ?", branch_ref)
}
pub fn confirm_title_delete_remote_branch(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "Delete Remote Branch".to_string()
+ "Delete Remote Branch".to_string()
}
pub fn confirm_msg_delete_remote_branch(
- _key_config: &SharedKeyConfig,
- branch_ref: &str,
+ _key_config: &SharedKeyConfig,
+ branch_ref: &str,
) -> String {
- format!("Confirm deleting remote branch: '{}' ?", branch_ref)
+ format!("Confirm deleting remote branch: '{}' ?", branch_ref)
}
pub fn confirm_title_delete_tag(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "Delete Tag".to_string()
+ "Delete Tag".to_string()
}
pub fn confirm_msg_delete_tag(
- _key_config: &SharedKeyConfig,
- tag_name: &str,
+ _key_config: &SharedKeyConfig,
+ tag_name: &str,
) -> String {
- format!("Confirm deleting Tag: '{}' ?", tag_name)
+ format!("Confirm deleting Tag: '{}' ?", tag_name)
}
pub fn confirm_title_force_push(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "Force Push".to_string()
+ "Force Push".to_string()
}
pub fn confirm_msg_force_push(
- _key_config: &SharedKeyConfig,
- branch_ref: &str,
+ _key_config: &SharedKeyConfig,
+ branch_ref: &str,
) -> String {
- format!(
+ format!(
"Confirm force push to branch '{}' ? This may rewrite history.",
branch_ref
)
}
pub fn log_title(_key_config: &SharedKeyConfig) -> String {
- "Commit".to_string()
+ "Commit".to_string()
}
pub fn blame_title(_key_config: &SharedKeyConfig) -> String {
- "Blame".to_string()
+ "Blame".to_string()
}
pub fn tag_commit_popup_title(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "Tag".to_string()
+ "Tag".to_string()
}
pub fn tag_commit_popup_msg(_key_config: &SharedKeyConfig) -> String {
- "type tag".to_string()
+ "type tag".to_string()
}
pub fn stashlist_title(_key_config: &SharedKeyConfig) -> String {
- "Stashes".to_string()
+ "Stashes".to_string()
}
pub fn help_title(_key_config: &SharedKeyConfig) -> String {
- "Help: all commands".to_string()
+ "Help: all commands".to_string()
}
pub fn stashing_files_title(_key_config: &SharedKeyConfig) -> String {
- "Files to Stash".to_string()
+ "Files to Stash".to_string()
}
pub fn stashing_options_title(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "Options".to_string()
+ "Options".to_string()
}
pub fn loading_text(_key_config: &SharedKeyConfig) -> String {
- "Loading ...".to_string()
+ "Loading ...".to_string()
}
pub fn create_branch_popup_title(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "Branch".to_string()
+ "Branch".to_string()
}
pub fn create_branch_popup_msg(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "type branch name".to_string()
+ "type branch name".to_string()
}
pub fn username_popup_title(_key_config: &SharedKeyConfig) -> String {
- "Username".to_string()
+ "Username".to_string()
}
pub fn username_popup_msg(_key_config: &SharedKeyConfig) -> String {
- "type username".to_string()
+ "type username".to_string()
}
pub fn password_popup_title(_key_config: &SharedKeyConfig) -> String {
- "Password".to_string()
+ "Password".to_string()
}
pub fn password_popup_msg(_key_config: &SharedKeyConfig) -> String {
- "type password".to_string()
+ "type password".to_string()
}
pub fn rename_branch_popup_title(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "Rename Branch".to_string()
+ "Rename Branch".to_string()
}
pub fn rename_branch_popup_msg(
- _key_config: &SharedKeyConfig,
+ _key_config: &SharedKeyConfig,
) -> String {
- "new branch name".to_string()
+ "new branch name".to_string()
}
pub mod commit {
- use crate::keys::SharedKeyConfig;
- pub fn details_author(_key_config: &SharedKeyConfig) -> String {
- "Author: ".to_string()
- }
- pub fn details_committer(
- _key_config: &SharedKeyConfig,
- ) -> String {
- "Committer: ".to_string()
- }
- pub fn details_sha(_key_config: &SharedKeyConfig) -> String {
- "Sha: ".to_string()
- }
- pub fn details_date(_key_config: &SharedKeyConfig) -> String {
- "Date: ".to_string()
- }
- pub fn details_tags(_key_config: &SharedKeyConfig) -> String {
- "Tags: ".to_string()
- }
- pub fn details_info_title(
- _key_config: &SharedKeyConfig,
- ) -> String {
- "Info".to_string()
- }
- pub fn details_message_title(
- _key_config: &SharedKeyConfig,
- ) -> String {
- "Message".to_string()
- }
- pub fn details_files_title(
- _key_config: &SharedKeyConfig,
- ) -> String {
- "Files:".to_string()
- }
+ use crate::keys::SharedKeyConfig;
+ pub fn details_author(_key_config: &SharedKeyConfig) -> String {
+ "Author: ".to_string()
+ }
+ pub fn details_committer(
+ _key_config: &SharedKeyConfig,
+ ) -> String {
+ "Committer: ".to_string()
+ }
+ pub fn details_sha(_key_config: &SharedKeyConfig) -> String {
+ "Sha: ".to_string()
+ }
+ pub fn details_date(_key_config: &SharedKeyConfig) -> String {
+ "Date: ".to_string()
+ }
+ pub fn details_tags(_key_config: &SharedKeyConfig) -> String {
+ "Tags: ".to_string()
+ }
+ pub fn details_info_title(
+ _key_config: &SharedKeyConfig,
+ ) -> String {
+ "Info".to_string()
+ }
+ pub fn details_message_title(
+ _key_config: &SharedKeyConfig,
+ ) -> String {
+ "Message".to_string()
+ }
+ pub fn details_files_title(
+ _key_config: &SharedKeyConfig,
+ ) -> String {
+ "Files:".to_string()
+ }
}
pub mod commands {
- use crate::components::CommandText;
- use crate::keys::SharedKeyConfig;
+ use crate::components::CommandText;
+ use crate::keys::SharedKeyConfig;
- static CMD_GROUP_GENERAL: &str = "-- General --";
- static CMD_GROUP_DIFF: &str = "-- Diff --";
- static CMD_GROUP_CHANGES: &str = "-- Changes --";
- static CMD_GROUP_COMMIT: &str = "-- Commit --";
- static CMD_GROUP_STASHING: &str = "-- Stashing --";
- static CMD_GROUP_STASHES: &str = "-- Stashes --";
- static CMD_GROUP_LOG: &str = "-- Log --";
- static CMD_GROUP_BRANCHES: &str = "-- Branches --";
+ static CMD_GROUP_GENERAL: &str = "-- General --";
+ static CMD_GROUP_DIFF: &str = "-- Diff --";
+ static CMD_GROUP_CHANGES: &str = "-- Changes --";
+ static CMD_GROUP_COMMIT: &str = "-- Commit --";
+ static CMD_GROUP_STASHING: &str = "-- Stashing --";
+ static CMD_GROUP_STASHES: &str = "-- Stashes --";
+ static CMD_GROUP_LOG: &str = "-- Log --";
+ static CMD_GROUP_BRANCHES: &str = "-- Branches --";
- pub fn toggle_tabs(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Next [{}]",
- key_config.get_hint(key_config.tab_toggle)
- ),
- "switch to next tab",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn toggle_tabs_direct(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Tab [{}{}{}{}{}]",
- key_config.get_hint(key_config.tab_status),
- key_config.get_hint(key_config.tab_log),
- key_config.get_hint(key_config.tab_files),
- key_config.get_hint(key_config.tab_stashing),
- key_config.get_hint(key_config.tab_stashes),
- ),
- "switch top level tabs directly",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn help_open(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Help [{}]",
- key_config.get_hint(key_config.open_help)
- ),
- "open this help screen",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn navigate_commit_message(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Nav [{}{}]",
- key_config.get_hint(key_config.move_up),
- key_config.get_hint(key_config.move_down)
- ),
- "navigate commit message",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn navigate_tree(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Nav [{}{}{}{}]",
- key_config.get_hint(key_config.move_up),
- key_config.get_hint(key_config.move_down),
- key_config.get_hint(key_config.move_right),
- key_config.get_hint(key_config.move_left)
- ),
- "navigate tree view, collapse, expand",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn scroll(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Scroll [{}{}]",
- key_config.get_hint(key_config.focus_above),
- key_config.get_hint(key_config.focus_below)
- ),
- "scroll up or down in focused view",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn copy(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Copy [{}]",
- key_config.get_hint(key_config.copy),
- ),
- "copy selected lines to clipboard",
- CMD_GROUP_DIFF,
- )
- }
- pub fn copy_hash(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Copy Hash [{}]",
- key_config.get_hint(key_config.copy),
- ),
- "copy selected commit hash to clipboard",
- CMD_GROUP_LOG,
- )
- }
- pub fn push_tags(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Push Tags [{}]",
- key_config.get_hint(key_config.push),
- ),
- "push tags to remote",
- CMD_GROUP_LOG,
- )
- }
- pub fn diff_home_end(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Jump up/down [{},{},{},{}]",
- key_config.get_hint(key_config.home),
- key_config.get_hint(key_config.end),
- key_config.get_hint(key_config.move_up),
- key_config.get_hint(key_config.move_down)
- ),
- "scroll to top or bottom of diff",
- CMD_GROUP_DIFF,
- )
- }
- pub fn diff_hunk_add(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Add hunk [{}]",
- key_config.get_hint(key_config.enter),
- ),
- "adds selected hunk to stage",
- CMD_GROUP_DIFF,
- )
- }
- pub fn diff_hunk_revert(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Reset hunk [{}]",
- key_config.get_hint(key_config.status_reset_item),
- ),
- "reverts selected hunk",
- CMD_GROUP_DIFF,
- )
- }
- pub fn diff_lines_revert(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Reset lines [{}]",
- key_config.get_hint(key_config.diff_reset_lines),
- ),
- "resets selected lines",
- CMD_GROUP_DIFF,
- )
- }
- pub fn diff_lines_stage(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Stage lines [{}]",
- key_config.get_hint(key_config.diff_stage_lines),
- ),
- "stage selected lines",
- CMD_GROUP_DIFF,
- )
- }
- pub fn diff_lines_unstage(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Unstage lines [{}]",
- key_config.get_hint(key_config.diff_stage_lines),
- ),
- "unstage selected lines",
- CMD_GROUP_DIFF,
- )
- }
- pub fn diff_hunk_remove(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Remove hunk [{}]",
- key_config.get_hint(key_config.enter),
- ),
- "removes selected hunk from stage",
- CMD_GROUP_DIFF,
- )
- }
- pub fn close_popup(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Close [{}]",
- key_config.get_hint(key_config.exit_popup),
- ),
- "close overlay (e.g commit, help)",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn close_msg(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Close [{}]",
- key_config.get_hint(key_config.enter),
- ),
- "close msg popup (e.g msg)",
- CMD_GROUP_GENERAL,
- )
- .hide_help()
- }
- pub fn validate_msg(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Validate [{}]",
- key_config.get_hint(key_config.enter),
- ),
- "validate msg",
- CMD_GROUP_GENERAL,
- )
- .hide_help()
- }
- pub fn select_status(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "To files [{},{}]",
- key_config.get_hint(key_config.tab_status),
- key_config.get_hint(key_config.tab_log),
- ),
- "focus/select file tree of staged or unstaged files",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn abort_merge(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Abort merge [{}]",
- key_config.get_hint(key_config.abort_merge),
- ),
- "abort ongoing merge",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn select_staging(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "To stage [{}]",
- key_config.get_hint(key_config.toggle_workarea),
- ),
- "focus/select staging area",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn select_unstaged(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "To unstaged [{}]",
- key_config.get_hint(key_config.toggle_workarea),
- ),
- "focus/select unstaged area",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn undo_commit(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Undo Commit [{}]",
- key_config.get_hint(key_config.undo_commit),
- ),
- "undo last commit",
- CMD_GROUP_GENERAL,
- )
- }
- pub fn commit_open(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Commit [{}]",
- key_config.get_hint(key_config.open_commit),
- ),
- "open commit popup (available in non-empty stage)",
- CMD_GROUP_COMMIT,
- )
- }
- pub fn commit_open_editor(
- key_config: &SharedKeyConfig,
- ) -> CommandText {
- CommandText::new(
- format!(
- "Open editor [{}]",
- key_config.get_hint(key_config.open_commit_editor),
- ),
- "open commit editor (available in commit popup)",
- CMD_GROUP_COMMIT,
- )
- }
- pub fn commit_enter(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Commit [{}]",
- key_config.get_hint(key_config.enter),
- ),
- "commit (available when commit message is non-empty)",
- CMD_GROUP_COMMIT,
- )
- .hide_help()
- }
- pub fn commit_amend(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Amend [{}]",
- key_config.get_hint(key_config.commit_amend),
- ),
- "amend last commit (available in commit popup)",
- CMD_GROUP_COMMIT,
- )
- }
- pub fn edit_item(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Edit [{}]",
- key_config.get_hint(key_config.edit_file),
- ),
- "edit the currently selected file in an external editor",
- CMD_GROUP_CHANGES,
- )
- }
- pub fn stage_item(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Stage [{}]",
- key_config.get_hint(key_config.enter),
- ),
- "stage currently selected file or entire path",
- CMD_GROUP_CHANGES,
- )
- }
- pub fn stage_all(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Stage All [{}]",
- key_config.get_hint(key_config.status_stage_all),
- ),
- "stage all changes (in unstaged files)",
- CMD_GROUP_CHANGES,
- )
- }
- pub fn unstage_item(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Unstage [{}]",
- key_config.get_hint(key_config.enter),
- ),
- "unstage currently selected file or entire path",
- CMD_GROUP_CHANGES,
- )
- }
- pub fn unstage_all(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Unstage all [{}]",
- key_config.get_hint(key_config.status_stage_all),
- ),
- "unstage all files (in staged files)",
- CMD_GROUP_CHANGES,
- )
- }
- pub fn reset_item(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Reset [{}]",
- key_config.get_hint(key_config.status_reset_item),
- ),
- "revert changes in selected file or entire path",
- CMD_GROUP_CHANGES,
- )
- }
- pub fn ignore_item(key_config: &SharedKeyConfig) -> CommandText {
- CommandText::new(
- format!(
- "Ignore [{}]",
- key_config.get_hint(key_config.status_ignore_file),
- ),
- "Add file or path to .gitignore",
- CMD_GROUP_CHANGES,
- )
- }
+ pub fn toggle_tabs(key_config: &SharedKeyConfig) -> CommandText {
+ CommandText::new(
+ format!(
+ "Next [{}]",
+ key_config.get_hint(key_config.tab_toggle)
+ ),
+ "switch to next tab",
+ CMD_GROUP_GENERAL,
+ )
+ }
+ pub fn toggle_tabs_direct(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "Tab [{}{}{}{}{}]",
+ key_config.get_hint(key_config.tab_status),
+ key_config.get_hint(key_config.tab_log),
+ key_config.get_hint(key_config.tab_files),
+ key_config.get_hint(key_config.tab_stashing),
+ key_config.get_hint(key_config.tab_stashes),
+ ),
+ "switch top level tabs directly",
+ CMD_GROUP_GENERAL,
+ )
+ }
+ pub fn help_open(key_config: &SharedKeyConfig) -> CommandText {
+ CommandText::new(
+ format!(
+ "Help [{}]",
+ key_config.get_hint(key_config.open_help)
+ ),
+ "open this help screen",
+ CMD_GROUP_GENERAL,
+ )
+ }
+ pub fn navigate_commit_message(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "Nav [{}{}]",
+ key_config.get_hint(key_config.move_up),
+ key_config.get_hint(key_config.move_down)
+ ),
+ "navigate commit message",
+ CMD_GROUP_GENERAL,
+ )
+ }
+ pub fn navigate_tree(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "Nav [{}{}{}{}]",
+ key_config.get_hint(key_config.move_up),
+ key_config.get_hint(key_config.move_down),
+ key_config.get_hint(key_config.move_right),
+ key_config.get_hint(key_config.move_left)
+ ),
+ "navigate tree view, collapse, expand",
+ CMD_GROUP_GENERAL,
+ )
+ }
+ pub fn scroll(key_config: &SharedKeyConfig) -> CommandText {
+ CommandText::new(
+ format!(
+ "Scroll [{}{}]",
+ key_config.get_hint(key_config.focus_above),
+ key_config.get_hint(key_config.focus_below)
+ ),
+ "scroll up or down in focused view",
+ CMD_GROUP_GENERAL,
+ )
+ }
+ pub fn copy(key_config: &SharedKeyConfig) -> CommandText {
+ CommandText::new(
+ format!(
+ "Copy [{}]",
+ key_config.get_hint(key_config.copy),
+ ),
+ "copy selected lines to clipboard",
+ CMD_GROUP_DIFF,
+ )
+ }
+ pub fn copy_hash(key_config: &SharedKeyConfig) -> CommandText {
+ CommandText::new(
+ format!(
+ "Copy Hash [{}]",
+ key_config.get_hint(key_config.copy),
+ ),
+ "copy selected commit hash to clipboard",
+ CMD_GROUP_LOG,
+ )
+ }
+ pub fn push_tags(key_config: &SharedKeyConfig) -> CommandText {
+ CommandText::new(
+ format!(
+ "Push Tags [{}]",
+ key_config.get_hint(key_config.push),
+ ),
+ "push tags to remote",
+ CMD_GROUP_LOG,
+ )
+ }
+ pub fn diff_home_end(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "Jump up/down [{},{},{},{}]",
+ key_config.get_hint(key_config.home),
+ key_config.get_hint(key_config.end),
+ key_config.get_hint(key_config.move_up),
+ key_config.get_hint(key_config.move_down)
+ ),
+ "scroll to top or bottom of diff",
+ CMD_GROUP_DIFF,
+ )
+ }
+ pub fn diff_hunk_add(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "Add hunk [{}]",
+ key_config.get_hint(key_config.enter),
+ ),
+ "adds selected hunk to stage",
+ CMD_GROUP_DIFF,
+ )
+ }
+ pub fn diff_hunk_revert(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "Reset hunk [{}]",
+ key_config.get_hint(key_config.status_reset_item),
+ ),
+ "reverts selected hunk",
+ CMD_GROUP_DIFF,
+ )
+ }
+ pub fn diff_lines_revert(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "Reset lines [{}]",
+ key_config.get_hint(key_config.diff_reset_lines),
+ ),
+ "resets selected lines",
+ CMD_GROUP_DIFF,
+ )
+ }
+ pub fn diff_lines_stage(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "Stage lines [{}]",
+ key_config.get_hint(key_config.diff_stage_lines),
+ ),
+ "stage selected lines",
+ CMD_GROUP_DIFF,
+ )
+ }
+ pub fn diff_lines_unstage(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "Unstage lines [{}]",
+ key_config.get_hint(key_config.diff_stage_lines),
+ ),
+ "unstage selected lines",
+ CMD_GROUP_DIFF,
+ )
+ }
+ pub fn diff_hunk_remove(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "Remove hunk [{}]",
+ key_config.get_hint(key_config.enter),
+ ),
+ "removes selected hunk from stage",
+ CMD_GROUP_DIFF,
+ )
+ }
+ pub fn close_popup(key_config: &SharedKeyConfig) -> CommandText {
+ CommandText::new(
+ format!(
+ "Close [{}]",
+ key_config.get_hint(key_config.exit_popup),
+ ),
+ "close overlay (e.g commit, help)",
+ CMD_GROUP_GENERAL,
+ )
+ }
+ pub fn close_msg(key_config: &SharedKeyConfig) -> CommandText {
+ CommandText::new(
+ format!(
+ "Close [{}]",
+ key_config.get_hint(key_config.enter),
+ ),
+ "close msg popup (e.g msg)",
+ CMD_GROUP_GENERAL,
+ )
+ .hide_help()
+ }
+ pub fn validate_msg(key_config: &SharedKeyConfig) -> CommandText {
+ CommandText::new(
+ format!(
+ "Validate [{}]",
+ key_config.get_hint(key_config.enter),
+ ),
+ "validate msg",
+ CMD_GROUP_GENERAL,
+ )
+ .hide_help()
+ }
+ pub fn select_status(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+ format!(
+ "To files [{},{}]",
+ key_config.get_hint(key_config.tab_status),
+ key_config.get_hint(key_config.tab_log),
+ ),
+ "focus/select file tree of staged or unstaged files",
+ CMD_GROUP_GENERAL,
+ )
+ }
+ pub fn abort_merge(key_config: &SharedKeyConfig) -> CommandText {
+ CommandText::new(
+ format!(
+ "Abort merge [{}]",
+ key_config.get_hint(key_config.abort_merge),
+ ),
+ "abort ongoing merge",
+ CMD_GROUP_GENERAL,
+ )
+ }
+ pub fn select_staging(
+ key_config: &SharedKeyConfig,
+ ) -> CommandText {
+ CommandText::new(
+