Skip to main content

jj-menu

Simple CUI (TUI) Menu

demo/jj-demo.gif

Install

$ pip install jj-menu

( or $ pip install git+https://github.com/ytyng/jj-menu.git )

Setup

Create jjfile.py into any directory.

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

menu = [
    ('list python processes', 'ps -eafw|grep python'),
    ('move tmp', 'cd /tmp/'),
    ('list dirs', ['ls .', 'ls ..', 'ls ../..']),
    ('Git logs (simple)',
     'git log --graph --date-order -C -M --pretty=format:"<%h> %ad [%an] %Cgreen%d%Creset %s" '
     '--all --date=short'),
    ('Git logs (verbose)',
     'git log --graph --date=iso --decorate --name-status'),
    ('Copy datetime to pasteboard',
     'date +"%Y-%m-%d %H:%M:%S"|pbcopy')
]

And register shell function (Optional)

function jj(){
    RESULT_FILE=/tmp/_jj_result
    jj-menu --result-file=${RESULT_FILE}
    if [ $? == 0 ]; then
        history -s `cat ${RESULT_FILE}`
        source ${RESULT_FILE}
    fi
}

Run

$ jj

or

$ jj-menu

(In not registered jj shell function. Run selected command in subprocess.)

Key binds

ESC: Exit
Q: Exit
k: Up
j: Down

Metadata

Release files for jj-menu 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jj-menu 0.2.1
File Size Uploaded Provenance
jj-menu-0.2.1.tar.gz 4.0 kB Without provenance Details

Release files / jj-menu-0.2.1.tar.gz

Download URL jj-menu-0.2.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9bb01f536f1244f53a0dd428e155f505af2be4c053505daa243c5d86356820da
BLAKE2b-256 checksum
How to use checksums
97d557b16f5163bd921cf27d4f0de9da06a6c8c825f090b7794d4f81d30d3aed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for jj-menu 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page