Coder Social home page Coder Social logo

oper's Introduction

What is oper?

Oper is a basic history tool for git repositories managed by google's git-repo tool.

It can show a linear history across all managed git repositories.

Oper is inspired by tig, but is far for more basic.

Screenshot

Installation

Ubuntu

Ubuntu releases are available here. After downloading the package which fits your ubuntu version you can install it with

sudo apt install ./<path-to-deb-file>

Other Operating Systems

Oper is written in rust. You need the rust toolchain installed to be able to use it:

https://www.rust-lang.org/tools/install

Then you simply install oper with:

cargo install oper

Usage

Simply execute oper in a folder which is managed by git-repo.

For more advanced usage watch out for command line parameters:

  • Define the number of days to include in the history with the --days cli switch
  • Filter commits by using the --author or --message cli switches

Keys in the UI:

  • Scroll in the diff view with j (down) or k (up)
  • Press i to inspect a change in gitk (you need to install gitk seperatly)
  • Quit oper by pressing q

Custom Commands

You can run external executables on the currently selected commit. Running gitk with the key i is one example. You can add more custom commands on your own in oper's config file. The location of the config file depends on your operating system:

  • Mac OS: typically at /Users/<username>/Library/Application Support/oper/config.toml
  • Ubuntu: typically at /home/<username>/.config/oper/config.toml

Here we define a custom command to run git show in a new terminal window:

# Execute git show in a seperate terminal window
[[custom_command]]
key = "d"
executable = "gnome-terminal"
args = "-- git show {}"

Remarks

  • {} in the args field is substituted by the ID of the selected commit.
  • The working directory of the new process is set to the directory of the git repository where the selected commit belongs to.
  • You cannot run a command line executable in the same terminal as where oper is running, as this would interfer with oper's UI. Wrap your command into a new terminal instance instead (as seen in the example above).
  • You cannot override/assign keys which are already built-in (like j, k and q).

oper's People

Contributors

elektronenhirn avatar

Watchers

 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.