Giter Club home page Giter Club logo

zsh-histdb-fzf's Introduction

NB: If you like this, you might want to have an implementation with a better performance: zsh-histdb-skim

zsh-histdb-fzf

This addon uses fzf for searching the history kept with zsh-histdb.

See the example here:

asciicast

Activation

To enable the widget add the following binding to you zshrc

bindkey '^R' histdb-fzf-widget

Configuration

  • Date format: By default, the date format (us or non-us) is auto-detected based on your current locale settings (see LC_TIME). You can override this by setting the environment variable HISTDB_FZF_FORCE_DATE_FORMAT to either us or non-us.

Logging

If a filename is set to HISTDB_FZF_LOGFILE some debug information will be appended to that file.

zsh-histdb-fzf's People

Contributors

hobadee avatar ingomeyer441 avatar jeffcarpenter avatar m42e avatar thxph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zsh-histdb-fzf's Issues

Display issues with multi-line prompts

I have a multi-line ZSH prompt where input is given on the 2nd line. This causes issues with zsh-histdb-fzf. When a command is selected from history, anything that was previously between the start of line and current cursor position is invisible, and only the completed portion of the command is written out to the command line.

Swallow entire cli?

Step: if I press ctrl-r and then press f2 - f3 - f1 to switch to directory in a fullscreen terminal and prompt at top of screen/terminal--> do this couple of time, after each time do a clearscreen

observe fzf will takes all spaces and swallow prompt.

Error when switch mode?

Steps:

  1. ctrl-r
  2. switch between f1, f2, f3 in a quick speed
  3. observer error below that print out to terminal.
error in -separator
select
id,
strftime(case when datetime(max_start, 'unixepoch') > datetime('now', 'start of day') then '%H:%M' else (case when datetime(max_start, 'unixepoch') > datetime('now', 'start of year') then '%d/%m' else '%d/%m/%Y' end) end, max_start, 'unixepoch', 'localtime') as time,
CASE exit_status WHEN 0 THEN '' ELSE '' END || replace(argv, '
', ' ') as cmd,
CASE exit_status WHEN 0 THEN '' ELSE '' END
from
(select
  history.id as id, commands.argv as argv, max(start_time) as max_start, exit_status
from
  history
  left join commands on history.command_id = commands.id
  left join places on history.place_id = places.id
where  places.host='localhost'
group by history.command_id, history.place_id
order by max_start desc)
order by max_start desc

info:

latest up-to-date archlinux
fzf: 0.27.2 (8255aa2)
latest histdb
sqlite3: 3.36.0 2021-06-18 18:36:39 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafaalt1

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.