Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Yazi (means "duck") is a terminal file manager written in Rust, based on non-blo
- 🧰 Integration with ripgrep, fd, fzf, zoxide
- 💫 Vim-like input/pick/confirm/which/notify component, auto-completion for cd paths
- 🏷️ Multi-Tab Support, Cross-directory selection, Scrollable Preview (for videos, PDFs, archives, code, directories, etc.)
- 🔄 Bulk Renaming, Visual Mode, File Chooser, [Git Integration](https://github.com/yazi-rs/plugins/tree/main/git.yazi), [Mount Manager](https://github.com/yazi-rs/plugins/tree/main/mount.yazi)
- 🔄 Bulk Renaming, Archive Extraction, Visual Mode, File Chooser, [Git Integration](https://github.com/yazi-rs/plugins/tree/main/git.yazi), [Mount Manager](https://github.com/yazi-rs/plugins/tree/main/mount.yazi)
- 🎨 Theme System, Mouse Support, Trash Bin, Custom Layouts, CSI u, OSC 52
- ... and more!

Expand Down
2 changes: 1 addition & 1 deletion scripts/bump.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -euo pipefail

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd $SCRIPT_DIR/..

echo "Bumping version: $1"
Expand Down
2 changes: 1 addition & 1 deletion yazi-config/preset/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Default Configuration

> [!IMPORTANT]
> If you're using a stable release of Yazi instead of the latest nightly build, make sure you're checking these files from [the `shipped` tag][shipped], not the latest main branch.
> If you're using a stable release of Yazi instead of the newest nightly build, make sure you're checking these files out from [the `shipped` tag][shipped], not the newest `main` branch.

This directory contains the default configuration files for Yazi:

Expand Down
1 change: 1 addition & 0 deletions yazi-core/src/tasks/commands/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ impl Tasks {

terminal_clear(TTY.writer()).ok();
TTY.writer().write_all(buffered.as_bytes()).ok();
TTY.writer().flush().ok();

defer! { disable_raw_mode().ok(); }
enable_raw_mode().ok();
Expand Down
12 changes: 2 additions & 10 deletions yazi-dds/src/sendable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,11 @@ impl Sendable {
}

pub fn list_to_values(lua: &Lua, data: Vec<Data>) -> mlua::Result<MultiValue> {
let mut vec = Vec::with_capacity(data.len());
for v in data {
vec.push(Self::data_to_value(lua, v)?);
}
Ok(MultiValue::from_vec(vec))
data.into_iter().map(|d| Self::data_to_value(lua, d)).collect()
}

pub fn values_to_list(values: MultiValue) -> mlua::Result<Vec<Data>> {
let mut vec = Vec::with_capacity(values.len());
for value in values {
vec.push(Self::value_to_data(value)?);
}
Ok(vec)
values.into_iter().map(Self::value_to_data).collect()
}
}

Expand Down
8 changes: 7 additions & 1 deletion yazi-plugin/src/url/url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ impl Url {
pub fn register(lua: &Lua) -> mlua::Result<()> {
lua.register_userdata_type::<yazi_shared::url::Url>(|reg| {
reg.add_method("frag", |lua, me, ()| lua.create_string(me.frag()));
reg.add_field_method_get("base", |_, me| {
Ok(if me.base().as_os_str().is_empty() { None } else { Some(Self::from(me.base())) })
});
reg.add_field_method_get("is_regular", |_, me| Ok(me.is_regular()));
reg.add_field_method_get("is_search", |_, me| Ok(me.is_search()));
reg.add_field_method_get("is_archive", |_, me| Ok(me.is_archive()));
reg.add_field_method_get("is_absolute", |_, me| Ok(me.is_absolute()));
reg.add_field_method_get("has_root", |_, me| Ok(me.has_root()));

reg.add_method("name", |lua, me, ()| {
me.file_name().map(|s| lua.create_string(s.as_encoded_bytes())).transpose()
Some(me.name())
.filter(|&s| !s.is_empty())
.map(|s| lua.create_string(s.as_encoded_bytes()))
.transpose()
});
reg.add_method("stem", |lua, me, ()| {
me.file_stem().map(|s| lua.create_string(s.as_encoded_bytes())).transpose()
Expand Down
4 changes: 2 additions & 2 deletions yazi-plugin/src/utils/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ impl Utils {
let args = [Ok(Value::Table(plugin))]
.into_iter()
.chain(args.into_iter().map(|d| Sendable::data_to_value(lua, d)))
.collect::<mlua::Result<_>>()?;
.collect::<mlua::Result<MultiValue>>()?;

let values = Sendable::values_to_list(block.call(MultiValue::from_vec(args))?)?;
let values = Sendable::values_to_list(block.call(args)?)?;
tx.send(values).map_err(|_| "send failed".into_lua_err())
})
};
Expand Down
Loading