Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: new clippy lints #1395

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions atuin/src/command/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ impl Cmd {
println!("{base}");

if std::env::var("ATUIN_NOBIND").is_err() {
const BIND_CTRL_R: &str = r#"bindkey -M emacs '^r' _atuin_search_widget
const BIND_CTRL_R: &str = r"bindkey -M emacs '^r' _atuin_search_widget
bindkey -M vicmd '^r' _atuin_search_widget
bindkey -M viins '^r' _atuin_search_widget"#;
const BIND_UP_ARROW: &str = r#"bindkey -M emacs '^[[A' _atuin_up_search_widget
bindkey -M viins '^r' _atuin_search_widget";

const BIND_UP_ARROW: &str = r"bindkey -M emacs '^[[A' _atuin_up_search_widget
bindkey -M vicmd '^[[A' _atuin_up_search_widget
bindkey -M viins '^[[A' _atuin_up_search_widget
bindkey -M emacs '^[OA' _atuin_up_search_widget
bindkey -M vicmd '^[OA' _atuin_up_search_widget
bindkey -M viins '^[OA' _atuin_up_search_widget
bindkey -M vicmd 'k' _atuin_up_search_widget"#;
bindkey -M vicmd 'k' _atuin_up_search_widget";

if !self.disable_ctrl_r {
println!("{BIND_CTRL_R}");
}
Expand Down Expand Up @@ -105,7 +107,7 @@ bind -M insert \e\[A _atuin_bind_up";
println!("{full}");

if std::env::var("ATUIN_NOBIND").is_err() {
const BIND_CTRL_R: &str = r#"$env.config = (
const BIND_CTRL_R: &str = r"$env.config = (
$env.config | upsert keybindings (
$env.config.keybindings
| append {
Expand All @@ -116,8 +118,8 @@ bind -M insert \e\[A _atuin_bind_up";
event: { send: executehostcommand cmd: (_atuin_search_cmd) }
}
)
)"#;
const BIND_UP_ARROW: &str = r#"
)";
const BIND_UP_ARROW: &str = r"
# The up arrow keybinding has surprising behavior in Nu, and is disabled by default.
# See https://github.com/atuinsh/atuin/issues/1025 for details
# $env.config = (
Expand All @@ -132,7 +134,7 @@ bind -M insert \e\[A _atuin_bind_up";
# }
# )
# )
"#;
";
if !self.disable_ctrl_r {
println!("{BIND_CTRL_R}");
}
Expand Down