snoopy icon indicating copy to clipboard operation
snoopy copied to clipboard

`cd` is not logged

Open DenisMkS opened this issue 10 months ago • 2 comments

Checklist before starting to submit this bug report

I confirm that:

  • [X] I am submitting a bug report! :)
  • [X] I have tested this with the latest stable Snoopy version (or the latest master build).
  • [X] I have checked the FAQ.
  • [X] I have read Snoopy's documentation here and here.
  • [X] I have searched Snoopy issues for an existing issue that matches my problem, and found none.

Bug description

cd command is not logged. All other commands are in log, but not this one.

Image

Expected result

cd appears in logs

Actual result

none appears in logs

DenisMkS avatar Feb 04 '25 12:02 DenisMkS

Hey @DenisMkS,

cd is not an executable in any of the shells that I know, it's a built-in command, and thus its usage cannot be captured by Snoopy. Snoopy can only capture actual executions of actual programs.

You can, however, use the message_format configuration directive to add the cwd (Current Working Directory) data field to your log entries, i.e. like this:

message_format = "uid=%{uid} tty=%{tty} cmdline=%{cmdline} cwd=%{cwd}"

Verdict: Not really a bug, more like a documentation issue, and most likely I should change the default logging message format to include the cwd data field, it'd probably kinda make sense at this point.

bostjan avatar Feb 07 '25 00:02 bostjan

got it. thank you!

DenisMkS avatar Feb 07 '25 08:02 DenisMkS