Bash functions lose quote escaping when called from Yazi.
voronind-com opened this issue · comments
What system are you running Yazi on?
Linux Wayland
What terminal are you running Yazi in?
foot
Did you try the latest code to see if this problem got fixed?
Tried, but the problem still
yazi --debug
output
Yazi
Version: 0.2.5 (VERGEN_IDEMPOTENT_OUTPUT 1980-01-01)
OS: linux-x86_64 (unix)
Debug: false
Emulator
Emulator.via_env: ("foot", "tmux")
Emulator.via_csi: Ok(Unknown([]))
Emulator.detect: Foot
Adaptor
Adaptor.matches: Sixel
Desktop
XDG_SESSION_TYPE: Some("wayland")
WAYLAND_DISPLAY: Some("wayland-1")
DISPLAY: Some(":0")
SSH
shared.in_ssh_connection: false
WSL
/proc/sys/fs/binfmt_misc/WSLInterop: false
Variables
SHELL: Some("/run/current-system/sw/bin/bash")
EDITOR: Some("nvim")
ZELLIJ_SESSION_NAME: None
YAZI_FILE_ONE: None
YAZI_CONFIG_HOME: None
file(1)
Version: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "file-5.45\nmagic file from /nix/store/13b54bc6wphsvp93852n66fnl280llzd-file-5.45/share/misc/magic\n", stderr: "" })
Text Opener
default: Some(Opener { run: "nvim \"$@\"", block: true, orphan: false, desc: "Text", for_: None, spread: true })
block: Some(Opener { run: "nvim \"$@\"", block: true, orphan: false, desc: "Text", for_: None, spread: true })
tmux
TMUX: true
Ueberzug++
Version: Err(Os { code: 2, kind: NotFound, message: "No such file or directory" })
--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "/home/voronind/.local/state/yazi" directory.
Describe the bug
When I run the command with Yazi :name
it behaves just like it'd lose all the " inside. Same happens for any function really, all of them are broken. When run from the same shell outside of Yazi - they work as expected.
Expected Behavior
Functions do not lose their definition.
To Reproduce
bar() { sed -e "s/la/lo/"; }; foo() { echo "lalo" | bar; }; export -f foo bar; yazi
And in Yazi call :foo
.
Configuration
No response
Anything else?
No response
I need to find another example where it fails, gimme a minute and I'll reopen.
The issue was on my end, I missed exporting some required bash variables.
I'm going to lock this issue because it has been closed for 30 days. ⏳
This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.