Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix busybox compatibility #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mjholub
Copy link

@mjholub mjholub commented May 28, 2023

albeit this approach is more verbose, this allowed me to use this plugin under Alpine and shouldn't break coreutils systems either

Signed-off-by: Marcelina Hołub <[email protected]>

fix: awk busybox compat

Signed-off-by: Marcelina Hołub <[email protected]>
# awk is used instead of ps with -o ppid= because the latter is not
# supported by busybox
set tmux_fish_ppid (awk '/PPid:/ {print $2}' /proc/$tmux_fish_pid/status)
set tmux_fish_ppid_cmd_full (busybox ps | awk "{if (\$1 == $tmux_fish_ppid) print \$NF}")

Choose a reason for hiding this comment

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

@154pinkchairs you are using busybox in this line, but as far as I understand it is not available in every system. What's the idea?

Copy link
Author

Choose a reason for hiding this comment

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

hmm yup, my idea was just to have the script work with both, must've missed it

Copy link
Owner

Choose a reason for hiding this comment

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

Would you like to work on alternative? The existing function is error prone and I will have to choose one of the proposed options. This doesn't sound bad if it also covers the other edge cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants