Skip to content

Close tab/window upon opening file #829

Closed Locked Answered by sxyazi
baldwindavid asked this question in 1. Q&A
Discussion options

You must be logged in to vote

Try this:

function yazi_zed() {
	local tmp="$(mktemp -t "yazi-chooser.XXXXX")"
	yazi "$@" --chooser-file="$tmp"

	local opened_file="$(cat -- "$tmp" | head -n 1)"
	zed -- "$opened_file"

	rm -f -- "$tmp"
	exit
}

You may need to adjust the command parameters for zed.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@baldwindavid
Comment options

@sxyazi
Comment options

@baldwindavid
Comment options

@sxyazi
Comment options

Answer selected by baldwindavid
@baldwindavid
Comment options

@baldwindavid
Comment options

@sxyazi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
1. Q&A
Labels
None yet
2 participants