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

kill completions dosen't work on macos #17

Open
Magniquick opened this issue Apr 15, 2024 · 10 comments
Open

kill completions dosen't work on macos #17

Magniquick opened this issue Apr 15, 2024 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@Magniquick
Copy link

Screenshot 2024-04-15 at 11 41 16 AM
@Freed-Wu
Copy link
Owner

Darwin's ps has different output format with GNU/Linux. What is the output of the following command in your darwin machine?

ps -p$$ -wocommand --no-headers

@Freed-Wu Freed-Wu added the bug Something isn't working label Apr 15, 2024
@Freed-Wu Freed-Wu self-assigned this Apr 15, 2024
@Magniquick
Copy link
Author

Screenshot 2024-04-15 at 12 17 45 PM Hope I didn't do anything stupid

The ps manpage on darwin:
psman.txt

@Freed-Wu
Copy link
Owner

OK, darwin's ps doesn't have --no-headers. What is the output of ps -p$$ -wocommand (or ps -p$$ -w -ocommand or ps -p $$ -w -o command)?

@Magniquick
Copy link
Author

Magniquick commented Apr 15, 2024

Screenshot 2024-04-15 at 7 59 22 PM
all the same.

Freed-Wu added a commit that referenced this issue Apr 15, 2024
@Freed-Wu
Copy link
Owner

Can you try #18?

Freed-Wu added a commit that referenced this issue Apr 15, 2024
Freed-Wu added a commit that referenced this issue Apr 16, 2024
Freed-Wu added a commit that referenced this issue Apr 16, 2024
Freed-Wu added a commit that referenced this issue Apr 17, 2024
@Magniquick
Copy link
Author

(still isn't fixed. reopen maybe ?)

@Freed-Wu
Copy link
Owner

I think I should borrow a darwin machine, otherwise I cannot survey deeply :( Or wait any darwin user to find why it happened.

@Freed-Wu Freed-Wu reopened this Apr 20, 2024
@Magniquick
Copy link
Author

In #18, I did mention a working solution -

# give a preview of commandline arguments when completing `kill`
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-preview \
  '[[ $group == "[process ID]" ]] && ps --pid=$word -o cmd --no-headers -w -w'
zstyle ':fzf-tab:complete:(kill|ps):argument-rest' fzf-flags --preview-window=down:3:wrap

from fzf-tab wiki
(alternatively, try installing the bsd coreutils on your computer)

@Freed-Wu
Copy link
Owner

Real problem is:

screenshot

It shouldn't happen.

Magniquick added a commit to Magniquick/fzf-tab-source that referenced this issue Apr 21, 2024
@Magniquick
Copy link
Author

see #19 for I fix I implemented.

Magniquick added a commit to Magniquick/fzf-tab-source that referenced this issue May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants