fix: forward $PATH to tmux popup in zsh#3198
Open
postmath wants to merge 2 commits intoatuinsh:mainfrom
Open
Conversation
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
Contributor
Greptile SummaryFixes issue where
Important Files Changed
Last reviewed commit: e6b2df2 |
| 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'" |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The functionality to run a tmux popup has the problem that the command runs as a child of the
tmuxserver process, rather than the current shell. One potential issue is that the$PATHis not forwarded to this command, so theatuincommand may not be found.Fixes: #3182 (#3182)
Checks