Compare commits
4 Commits
830d036fa8
...
7411ecdb0d
Author | SHA1 | Date |
---|---|---|
|
7411ecdb0d | |
|
194f8e31e4 | |
|
eb7b08fed3 | |
|
72c0b59723 |
|
@ -12,12 +12,12 @@
|
|||
<sup>Special thanks to:</sup>
|
||||
|
||||
<!-- markdownlint-disable-next-line MD013 -->
|
||||
<div><img alt="Sponsored by Warp" width="230" src="https://raw.githubusercontent.com/warpdotdev/brand-assets/refs/heads/main/Github/Sponsor/Warp-Github-LG-03.png" /></div>
|
||||
<div><a href="https://go.warp.dev/zoxide"><img alt="Sponsored by Warp" width="230" src="https://raw.githubusercontent.com/warpdotdev/brand-assets/refs/heads/main/Github/Sponsor/Warp-Github-LG-03.png" /></a></div>
|
||||
<div><sup><b>Warp, built for coding with multiple AI agents.</b></sup></div>
|
||||
<div><sup>Available for macOS, Linux, and Windows.</sup></div>
|
||||
<div><sup>
|
||||
Visit
|
||||
<a href="https://www.warp.dev/?utm_source=github&utm_medium=referral&utm_campaign=zoxide_20231001"><u>warp.dev</u></a>
|
||||
<a href="https://go.warp.dev/zoxide"><u>warp.dev</u></a>
|
||||
to learn more.
|
||||
</sup></div>
|
||||
|
||||
|
|
|
@ -79,11 +79,11 @@ pub struct Edit {
|
|||
#[derive(Clone, Debug, Subcommand)]
|
||||
pub enum EditCommand {
|
||||
#[clap(hide = true)]
|
||||
Decrement { path: String },
|
||||
Decrement { paths: Vec<String> },
|
||||
#[clap(hide = true)]
|
||||
Delete { path: String },
|
||||
Delete { paths: Vec<String> },
|
||||
#[clap(hide = true)]
|
||||
Increment { path: String },
|
||||
Increment { paths: Vec<String> },
|
||||
#[clap(hide = true)]
|
||||
Reload,
|
||||
}
|
||||
|
|
|
@ -15,11 +15,15 @@ impl Run for Edit {
|
|||
match &self.cmd {
|
||||
Some(cmd) => {
|
||||
match cmd {
|
||||
EditCommand::Decrement { path } => db.add(path, -1.0, now),
|
||||
EditCommand::Delete { path } => {
|
||||
EditCommand::Decrement { paths } => paths.iter().for_each(|path| {
|
||||
db.add(path, -1.0, now);
|
||||
}),
|
||||
EditCommand::Delete { paths } => paths.iter().for_each(|path| {
|
||||
db.remove(path);
|
||||
}),
|
||||
EditCommand::Increment { paths } => {
|
||||
paths.iter().for_each(|path| db.add(path, 1.0, now))
|
||||
}
|
||||
EditCommand::Increment { path } => db.add(path, 1.0, now),
|
||||
EditCommand::Reload => {}
|
||||
}
|
||||
db.save()?;
|
||||
|
@ -50,17 +54,16 @@ impl Edit {
|
|||
// Search result
|
||||
"--no-sort",
|
||||
// Interface
|
||||
"--multi",
|
||||
"--bind=\
|
||||
btab:up,\
|
||||
ctrl-r:reload(zoxide edit reload),\
|
||||
ctrl-d:reload(zoxide edit delete {2..}),\
|
||||
ctrl-w:reload(zoxide edit increment {2..}),\
|
||||
ctrl-s:reload(zoxide edit decrement {2..}),\
|
||||
ctrl-d:reload(zoxide edit delete {+2..}),\
|
||||
ctrl-w:reload(zoxide edit increment {+2..}),\
|
||||
ctrl-s:reload(zoxide edit decrement {+2..}),\
|
||||
ctrl-z:ignore,\
|
||||
double-click:ignore,\
|
||||
enter:abort,\
|
||||
start:reload(zoxide edit reload),\
|
||||
tab:down",
|
||||
start:reload(zoxide edit reload)",
|
||||
"--cycle",
|
||||
"--keep-right",
|
||||
// Layout
|
||||
|
|
Loading…
Reference in New Issue