Closed rrrnld closed 9 months ago
Could this be because of custom FZF settings?
No, httm
is not reliant upon fzf
. All facilities are native
--preview
, could you check that you have bowie
in your PATH? nix
package chooses not to install bowie
and ounce
, you won't be able to use the bare --preview
.sudo execsnoop-bpfcc -x -q
output. I'd like to know what commands are executing when you take the steps above.test
and exec
and cut
). This could also be a bash
-ism I've introduced? Could you try running in a bash
env? I'm sorry nothing is immediately obvious as to what exactly your problem is.
I'm using fish 3.5.1, which I didn't mention in the original post.
ounce
nor bowie
are in nixpkgs and I did not install them in any other way, so that probably explains the bare --preview
. There is no error message however, is there any kind of verification done?bowie
or ounce
as you can see.execsnoop-bpfcc
from?Can you provide a link to the missing packages? A quick search for their names didn't turn up anything immediately helpful. Edit: Nevermind, found the links in the README.
My guess is that this is something nix
specific in the way that it encapsulates the httm
env. And probably that, in combination with the non-portability of my base script, and a non-standard shell make this not work.
Re: bare --preview
, the nix package is not installing httm
the same as the deb or rpm packaged versions. You absolutely need bowie
in your PATH. Again, I'd build from source in a clean base environment, with all the tools found in the deb and rpm packages in your PATH.
Given that you have a heterodox environment (take your pick -- you're on an OS with a wonky layout, you're not using a package provided by me, and/or not using my steps to build from source), without more, this would be a WONTFIX as it stands right now. That is -- you (and/or your package maintainer) are going to have to do the extra leg work to run the exact issue to ground (or I'm not going to install nix
just to figure it out) and I hope you do! execsnoop
could be really helpful here. I know it is for me. It prints the programs/scripts executed with arguments as they are executed on your system. You can find it for nix
here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/bpftrace/default.nix
However, I will be changing the base shell script to make it more portable/more error resistant, and to try to make all the possible failure conditions fail with an error (I am executing a script through a library and stderr
doesn't show up? Just ugh...), and I will open a branch and provide you a link, so you can build from source, and see if this new script makes any difference for you.
Appreciate you filing this bug, pleased to work with you to resolve, but, as indicated above, you're going to need to most of the hard stuff to root cause before I fix. I hope you understand. Thanks for filing the bug! It will remain open.
I think fish
could also be the source of your issue. httm --preview
requires a POSIX shell because it must execute a few basic shell commands, before executing any preview command. Because fish
is POSIX non-compliant, it may not be able to do this. Again, try running with bash
or zsh
to confirm. You may be able to simply add a fish
alias wrapping httm
in a POSIX compliant shell (dash, bash, zsh...)!
Try with the linked release: https://github.com/kimono-koans/httm/releases/tag/0.17.5
Thank you very much for your information. I will see to look into this ASAP.
I am going to close this. bowie
is required to be installed, and I've tested personally with fish and it works. Feel free to refile if/when your package includes bowie
and you've installed a later versions with perhaps better errors about what is happened. Thanks!
I'm closing again with this release: https://github.com/kimono-koans/httm/releases/tag/0.31.3
@heyarne In case you are still interested: version 0.31.5 works perfectly in NixOS using fish. PR here: https://github.com/NixOS/nixpkgs/pull/267886
Love this utility, it's really neat! Unfortunately
--preview
doesn't seem to work? I just built 0.17.4 using a custom fork ofnixpkgs
, and runninghttm --preview -s
looks like this:Then after selecting a file that changed, this is the next screen:
As you can see, there's no diff shown. Could this be because of custom FZF settings? Other settings don't seem to influence the appearance of
httm
(I have a custom cursor for example), but maybe that's a potential source of bugs. I tried just--preview
as well as custom commands (--preview='delta {snap_file} {live_file}'
and--preview='diff {snap_file} {live_file}'
), none seemed to work. Any idea why not?PS: Maybe if no arguments are specified in
--preview
, assume that the command just takes arguments indiff
order?