Code Monkey home page Code Monkey logo

zsh-thefuck's Introduction

thefuck

License: MIT

ZSH plugin. Initialize thefuck with cache support, which reduce the loading time dramatically. ( 120ms -> 2ms )

This plugin is designed as a Prezto module, but it's also compatible with other plugin managers.

Installation

Zplugin

The only ZSH plugin manager solves the time-consuming init for nvm, nodenv, pyenv, rvm, rbenv, thefuck, fasd, etc, with its amazing async Turbo Mode.

zplugin ice wait'1' lucid
zplugin light laggardkernel/zsh-thefuck

Prezto

The only framework does optimizations in plugins with sophisticated coding skill:

mkdir -p ${ZDOTDIR:-$HOME}/.zprezto/contrib 2>/dev/null
git clone https://github.com/laggardkernel/zsh-thefuck.git ${ZDOTDIR:-$HOME}/.zprezto/contrib/thefuck

Settings

Alias

The default alias for thefuck is fuck, you can customize the alias,

zstyle ":prezto:module:thefuck" alias "damn"

Key bindings

Key binding Esc Esc is enabled to trigger function fuck-command-line to input the last rectified commands in the shell quickly. You can disable this auto keybinding behavior and set your own keybinding with,

# disable the default keybinding
zstyle ":prezto:module:thefuck" bindkey "no"

# customize your own keybinding
bindkey "\e\e" fuck-command-line

Conf File Location for Freshness Comparison

By default, this module compares the freshness between .zprezto and the cache file. Once the .zprezto is modified and newer than the cache file, the cache will be regenerated.

If you're not using Prezto, you may want to change the conf file used in the freshness comparison.

zstyle ":prezto:runcom" zpreztorc "$HOME/.config/zsh/.zshrc"

Credit

The shortcut function fuck-command-line is borrowed from oh-my-zsh/plugins/thefuck.

License

The MIT License (MIT)

Copyright (c) 2019 laggardkernel

zsh-thefuck's People

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

Watchers

 avatar  avatar

Forkers

pearagone

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.