Git Product home page Git Product logo

zsh-history-enquirer's Introduction

zsh-history-enquirer

Build Status Build Status NPM Version NPM Downloads Node.js License

What's this

A plugin that enhances zsh history search interaction, with review and choose in a multiline menu

Preview

screenshot

Ctrl + R
zsh-history-enquirer screenshot

live demo

zsh-history-enquirer preview

Install

antigen

antigen bundle zthxxx/zsh-history-enquirer

oh-my-zsh

If you are using oh-my-zsh, all you need to do is one npm command.

npm i -g zsh-history-enquirer

The install/uninstall hooks will be correctly setup in your oh-my-zsh plugins and config. Manually editing .zshrc is no longer necessary

one-line command

You can use a one-line command (which will auto install node via nvm, if node command not found)

curl -#sSL https://github.com/zthxxx/zsh-history-enquirer/raw/master/scripts/installer.zsh | zsh

manually without oh-my-zsh

If you don't use oh-my-zsh, you can manually add the source plugin file to your .zshrc after npm is installed and manually remove the source command when it is uninstalled.

echo 'source `npm root -g`/zsh-history-enquirer/zsh-history-enquirer.plugin.zsh' >> ~/.zshrc

Usage

This plugin will replace the default ZSH history search with the ^R shortcut.

Just press ^R (Ctrl + R) to enjoy enhanced history search!

License

MIT LICENSE

Author

zsh-history-enquirer © zthxxx, Released under the MIT License.

Blog @zthxxx · GitHub @zthxxx

zsh-history-enquirer's People

Contributors

renovate-bot avatar unixorn avatar vakintosh avatar zthxxx 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  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  avatar  avatar

zsh-history-enquirer's Issues

TypeError [ERR_INVALID_ARG_TYPE] in zsh-history-enquirer/index.js:7

I installed jovial using the installation script (curl -sSL https://github.com/zthxxx/jovial/raw/master/installer.sh | sudo -E bash -s $USER). This installed zsh-history-enquirer.

When I try to access the history via ^R I get the following error message:

/usr/local/lib/node_modules/zsh-history-enquirer/index.js:7
    throw err
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    at promisify (internal/util.js:209:11)
    at Object.<anonymous> (/usr/local/lib/node_modules/zsh-history-enquirer/dist/index.js:1746:35)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/zsh-history-enquirer/index.js:3:17)

I'm running macOS Monterey v12.6. (Darwin -- 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64).

Do you know what I might be doing wrong? Or is this an actual bug?

Thanks for your work :)

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid configuration option: logLevel

Install as root, but oh-my-zsh only on users

Hi

i have installed it as root (sudo), but post install not working on user

~ > sudo -H npm i -g zsh-history-enquirer --unsafe-perm=true                                                                                                                         at 01:47:36
Password:

> [email protected] preinstall /usr/local/lib/node_modules/zsh-history-enquirer
> command -v zsh || (npm run warn:zsh && exit 1)

/bin/zsh
/usr/local/bin/fcenquire -> /usr/local/lib/node_modules/zsh-history-enquirer/bin/index.js

> [email protected] postinstall /usr/local/lib/node_modules/zsh-history-enquirer
> env zsh -il ./scripts/postinstall.zsh


  
  Warning: cannot find oh-my-zsh, skip setup plugin for oh-my-zsh
  
  
+ [email protected]
added 1 package from 1 contributor in 2.234s

i run after install manually

env zsh -il /usr/local/lib/node_modules/zsh-history-enquirer/scripts/postinstall.zsh

but when reopen new terminal i receive this message

[oh-my-zsh] plugin 'zsh-history-enquirer' not found

others plugins working without problems...

the problem is on symlink of /scripts/zsh-history-enquirer.plugin.zsh here

ln -fs "`pwd`/scripts/${package_name}.plugin.zsh" "${plugins_dir}/${package_name}/"

fixed manualy

rm .oh-my-zsh/custom/plugins/zsh-history-enquirer/zsh-history-enquirer.plugin.zsh
ln -fs /usr/local/lib/node_modules/zsh-history-enquirer/scripts/zsh-history-enquirer.plugin.zsh .oh-my-zsh/custom/plugins/zsh-history-enquirer/zsh-history-enquirer.plugin.zsh 

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid schedule: 'Invalid schedule: Failed to parse "before 12am every Monday"'

TODO list

  • refactor and remove enquirer
  • rename project name and bin file name
  • documents for features how to use
  • support multiline input

Suggestion : Move from Node packages format

Hello, Mister.
I want to give suggestion for this plugin. I'm not hate with Node packages. I use this this plugin because using Jovial, Zsh theme created with you with OhMyZsh. I only give suggestion to move this extension to Zsh scripting, so user not must to install NodeJS to use plugin. If you want keep this plugin use Node package, i's okay. This is my suggestion only.
Thanks for reading my issue.

Installer un-symlinked my .zshrc

My .zshrc is a symlink to my git-tracked version of the real .zshrc, like this:

cd $HOME
ln -s .oh-my-zsh/my.zshrc .zshrc

After running the installer for zsh-history-enquirer, my symlink was gone and a static text file named .zshrc was in its place.

The rest of the install didn't work either, so I've given up trying. But unlinking my file was unexpected.

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.