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

cannot show process on mac #13

Closed
kenchou opened this issue Aug 6, 2022 · 4 comments · Fixed by #15
Closed

cannot show process on mac #13

kenchou opened this issue Aug 6, 2022 · 4 comments · Fixed by #15
Assignees
Labels
bug Something isn't working

Comments

@kenchou
Copy link

kenchou commented Aug 6, 2022

Describe the bug

❯ kill ps: illegal option -- -
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
          [-g grp[,grp...]] [-u [uid,uid...]]

System (please complete the following information):

  • fish version 3.5.1
  • Mac OS 12.5
@kenchou kenchou added the bug Something isn't working label Aug 6, 2022
@gazorby
Copy link
Owner

gazorby commented Aug 6, 2022

Hi @kenchou!

Are you on the latest fifc?
Can you run fisher update gazorby/fifc and test if it still happens?

@kenchou
Copy link
Author

kenchou commented Aug 9, 2022

It's latest. I'm first install.
problem is here: https://github.com/gazorby/fifc/blob/main/conf.d/fifc.fish#L26
The options of ps on mac os (BSD) are difference

from man ps

     -o      Display information associated with the space or comma separated list of keywords specified.  Multiple keywords
             may also be given in the form of more than one -o option.  Keywords may be appended with an equals (‘=’) sign and
             a string.  This causes the printed header to use the specified string instead of the standard header.  If all
             keywords have empty header texts, no header line is written.
Linux Mac OS memo
--format pid,command -o pid,command option -o both available on linux/mac
--no-headers -o pid=,command= append = to column name, both available on linux/mac

@gazorby
Copy link
Owner

gazorby commented Aug 9, 2022

Oh I see, thanks pointed that out.

So ps -ax -o pid=,command= should give the desired output

@kenchou
Copy link
Author

kenchou commented Aug 9, 2022

Yes, I'm tried it. seems fine both on mac and linux

fifc \
    -n 'test "$fifc_group" = processes' \
    -s 'ps -ax -o pid=,command='

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

Successfully merging a pull request may close this issue.

2 participants