Git Product home page Git Product logo

Comments (12)

junegunn avatar junegunn commented on May 13, 2024

Thanks.
It's obviously zsh's problem. And it looks like we don't need history command.

1, 2, 3, 4, 5 as you described
6. Just press enter
7. CTRL+R, and you'll see the updated list

Seems like command history seen inside a widget is not immediately updated until you start a new prompt by pressing enter. Are you aware of any way to fix the behavior?

from fzf.

roboslone avatar roboslone commented on May 13, 2024

Not yet. But I'll be sure to submit this to zsh developers.
Thanks.

from fzf.

roboslone avatar roboslone commented on May 13, 2024

@junegunn, almost forgot :) Is there any way to show more than just 30 last commands in Ctrl+R menu? Didn't find any way to change this behaviour.

from fzf.

junegunn avatar junegunn commented on May 13, 2024

Hmm, fzf should show unlimited number of commands. (See https://github.com/junegunn/fzf/blob/master/install#L219)

Please update the repository and re-run the install script.

from fzf.

roboslone avatar roboslone commented on May 13, 2024

Yeah, that's fc thing, I guess. Still can't view more than last 30 lines :(
BTW, fc has -n option, which could omit | sed "s/ *[0-9*]* *//". Line numbers may be useful, but with inc_history_append there're also asterisks after some line numbers which ends up in something like that - * ls ./.

from fzf.

junegunn avatar junegunn commented on May 13, 2024

What is the output of fc -l 1 | wc -l? AFAIK, fc -l 1 command should report all the commands in the history so if it returns 30, you should check your shell configuration.

Removing command index was discussed before, but I find it useful and won't remove it. And the sed command already removes the asterisk as well ([0-9*]*).

from fzf.

roboslone avatar roboslone commented on May 13, 2024

fc -l 1 prints 28-29 lines. And my ~/.zsh_history contains 130 lines at the moment.

from fzf.

junegunn avatar junegunn commented on May 13, 2024

Hmm. How about 'history' 1 | wc -l?

from fzf.

roboslone avatar roboslone commented on May 13, 2024

Same.

from fzf.

junegunn avatar junegunn commented on May 13, 2024

Okay, then there's nothing fzf or .fzf.zsh can do. You should figure out why those commands are giving you only 30 commands.

from fzf.

junegunn avatar junegunn commented on May 13, 2024

Do you have $HISTSIZE set?

See "2.5.4: Setting up history " section in http://zsh.sourceforge.net/Guide/zshguide02.html

from fzf.

roboslone avatar roboslone commented on May 13, 2024

Yep, zsh support answered me with that:

This has already been reported and a patch can be found in the article
zsh-workers/32682 ( http://www.zsh.org/mla/workers/2014/msg00470.html )

It was an intentional change to fix a different problem (elapsed time
accuracy) but we underestimated the importance for some users of having
the immediate file update.

Haven't tried this yet, though.

from fzf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.