-
-
Notifications
You must be signed in to change notification settings - Fork 506
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
integrate with fzf #68
Comments
Yeah that seems to be a bug. It's looking for the |
Yup the bug is with the bash script! The As well as that, you'll probably want a nice way of listing only the command for |
Hey @neerajbadlani! Once #89 merges, you should be able to do something like this
|
Thanks @ellie , above works and is close to what i want . However I see duplicate entries in history . Also , new to rust ecosystem , since brew install --HEAD dint work , so had to do manual installation .
|
|
Thanks , I am able to integrate it with fzf properly now , exactly similar to what fzf provides , but with machine machine and session sync . |
Something like this should work :) https://stackoverflow.com/questions/11532157/remove-duplicate-lines-without-sorting We could add a unique flag, but I'd rather not unless it's 100% necessary Another issue for sorted history would be good! I've been thinking of how we can better prioritise things |
Maybe we should ask fzf's maintainers to detect if atuin is in the path and use that instead of history. |
I'm looking forward to this feature! @ellie Each time I write a command and press the UP key to auto-complete current cmd, TUI appears and I had a bit distracting DX. It would be great if we are able to use it with i.e. something like the following, but |
^ kind ping @ellie 🙏 |
@Dentrax I believe what you want is possible, although I don't know the details of how to configure the hook correctly. This command does what you want, atuin history list --cmd-only | fzf Now, if you set There's a secondary issue that atuin streaming to fzf is slow but I'm gonna close this issue as solved and open a new one for that |
this thing works export ATUIN_NOBIND="true"
eval "$(atuin init zsh)"
zle -N _atuinr_widget _atuinr
_atuinr() {
atuin history list --cmd-only | fzf
}
bindkey '^r' _atuinr_widget The only difference is that it immediately executes the code instead of put it into the shell input. |
I have @hd-deman You can write stuff into the shell input by setting it in the buffer like this: BUFFER="some stuff" |
your
Perfect. just what I needed. Thanks |
It was mentioned here already: #286 |
This doesn't work for multiline entries in the shell history. Has anyone been able to solve that? |
I found https://news.ycombinator.com/item?id=35256206 reposting here for brevity:
This works really well so far! |
if you only use zsh-autosuggestions this works:
|
Works really well - but how do I get the preview window? I tried adding |
Has anyone been able to get this working properly with multiline shell history? If there's a history command that is multiline, it shows up as multiple entries in the fzf list, which makes this fzf-based search unusable :( |
Also wondering this |
#1274 which should be out next week should help with that |
This worked for me local fzf_opts=(
--height=${FZF_TMUX_HEIGHT:-80%}
--tac
"-n2..,.."
--tiebreak=index
"--query=${LBUFFER}"
"+m"
'--preview=echo {}'
"--preview-window=down:3:hidden:wrap"
"--bind=?:toggle-preview"
"--bind=ctrl-d:reload(atuin search $atuin_opts -c $PWD),ctrl-r:reload(atuin search $atuin_opts)"
)
|
Does anyone have fzf working with atuin and fish? It seems like that script is zsh only. |
Unfortunately , I tried tui search , but still want to use fzf history search .
I am trying to integrate with fzf using history list , it throws following error .
Can u please help ?
Thanks
[master:.configfiles] atuin history list
Error: environment variable not found
Location:
src/command/history.rs:151:56
The text was updated successfully, but these errors were encountered: