Giter Site home page Giter Site logo

joepvd / per-directory-history Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jimhester/per-directory-history

0.0 2.0 0.0 232 KB

Per directory history for zsh, as well as global history, and the ability to toggle between them with ^G.

License: Other

Shell 100.00%

per-directory-history's Introduction

Per directory history for zsh, as well as global history, and the ability to toggle between them with ^G.

This is a implementation of per directory history for zsh, some implementations of which exist in bash1,2. It also implements a per-directory-history-toggle-history function to change from using the directory history to using the global history. In both cases the history is always saved to both the global history and the directory history, so the toggle state will not effect the saved histories. Being able to switch between global and directory histories on the fly is a novel feature as far as I am aware.

This is a standalone repository for the script, however it is also included in oh-my-zsh as a plugin.


Usage

  1. Load this script into your interactive ZSH session:

    % source zsh-per-directory-history.zsh
    
  2. The default mode if per directory history, interact with your history as normal.

  3. Press ^G (the Control and G keys simultaneously) to toggle between local and global histories. If you would prefer a different shortcut to toggle set the PER_DIRECTORY_HISTORY_TOGGLE environment variable.


Configuration

  • HISTORY_BASE a global variable that defines the base directory in which the directory histories are stored
  • per-directory-history-toggle-history is the function to toggle the history

History

The idea/inspiration for a per directory history is from Stewart MacArthur and Dieter, the implementation idea is from Bart Schaefer. The implementation is by Jim Hester in September 2012.

per-directory-history's People

Contributors

jimhester avatar andrewmwhite avatar rowanthorpe avatar

Watchers

James Cloos avatar  avatar

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.