Skip to content

Comments

fix: forward $PATH to tmux popup in zsh#3198

Open
postmath wants to merge 2 commits intoatuinsh:mainfrom
postmath:fix-3182-zsh-init-code-doesnt-forward-path
Open

fix: forward $PATH to tmux popup in zsh#3198
postmath wants to merge 2 commits intoatuinsh:mainfrom
postmath:fix-3182-zsh-init-code-doesnt-forward-path

Conversation

@postmath
Copy link
Contributor

The functionality to run a tmux popup has the problem that the command runs as a child of the tmux server process, rather than the current shell. One potential issue is that the $PATH is not forwarded to this command, so the atuin command may not be found.

Fixes: #3182 (#3182)

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • I have checked that there are no existing pull requests for the same thing

The functionality to run a tmux popup has the problem that the command
runs as a child of the `tmux` *server* process, rather than the current
shell. One potential issue is that the `$PATH` is not forwarded to this
command, so the `atuin` command may not be found.

Fixes: atuinsh#3182
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 19, 2026

Greptile Summary

Fixes issue where atuin command isn't found in tmux popup by forwarding $PATH environment variable.

  • Fix correctly addresses the root cause - tmux popup runs as child of tmux server, not current shell
  • However, atuin.bash and atuin.fish have identical tmux popup implementations that suffer from the same issue and should also be fixed

Important Files Changed

Filename Overview
crates/atuin/src/shell/atuin.zsh Forwards $PATH to tmux popup to fix atuin command not found issue; bash and fish shells have the same issue

Last reviewed commit: e6b2df2

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

popup_height="${ATUIN_TMUX_POPUP_HEIGHT:-60%}"
tmux display-popup -d "$cdir" -w "$popup_width" -h "$popup_height" -E -E -- \
sh -c "ATUIN_SESSION='$ATUIN_SESSION' ATUIN_SHELL=zsh ATUIN_LOG=error ATUIN_QUERY='$escaped_query' atuin search $escaped_args -i 2>'$result_file'"
sh -c "PATH='$PATH' ATUIN_SESSION='$ATUIN_SESSION' ATUIN_SHELL=zsh ATUIN_LOG=error ATUIN_QUERY='$escaped_query' atuin search $escaped_args -i 2>'$result_file'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue exists in atuin.bash:291 and atuin.fish:104 - they also need PATH='$PATH' added to their tmux popup commands

I didn't realize that atuinsh#3182 also affects bash and fish, but a bot let me
know. I haven't manually tested this as I don't normally use bash or
fish, but I can't imagine it going wrong.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: atuin zsh init code doesn't forward $PATH to tmux popup setting

1 participant