Skip to content

Commit 82890bf

Browse files
committed
Reimplementation: Do the chdir() once
No need to chdir (and query that filespec from Tmux) for each passed file.
1 parent 1909ee5 commit 82890bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

open.tmux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ is_cygwin() {
3030

3131
command_generator() {
3232
local command_string="$1"
33-
echo "xargs -I {} tmux run-shell -b 'cd #{pane_current_path}; $command_string \"{}\" > /dev/null'"
33+
echo "{ cd \"\$(tmux display-message -p '#{pane_current_path}')\" && xargs -I {} $command_string \"{}\" >/dev/null; }"
3434
}
3535

3636
search_command_generator() {

0 commit comments

Comments
 (0)