Giter Site home page Giter Site logo

lucq-rs's Introduction

LucQ-rs

Linux user command queue, help Linux users execute commands (only Linux) or codes (Shell and Python) in sequence.

Usage

Linux user command queue

Usage: lucq [OPTIONS]

Options:
  -m, --mode <mode>      Run mode (cli or exec) [default: cli]
  -a, --add <job>        Add one command [default: null]
      --before <id>      Add one command before <id> [default: -1]
      --after <id>       Add one command after <id> [default: -1]
  -d, --delete <id(s)>   Delete command(s) (example: 1 or 1-5) [default: null]
      --cancel <id(s)>   Cancel command(s) (keep it in history but not run, example: 1 or 1-5) [default: null]
  -e, --executor <path>  Executor path (example: /usr/bin/python3) [default: null]
  -g, --grep <name>      Search and show [default: null]
  -l, --list             List all commands
  -c, --clean            Clean database
      --align            Align database
      --noemoji          Do not use emoji
  -h, --help             Print help
  -V, --version          Print version

Prepare two terminals

One for execute the command in background, one for add new command into queue.

Execute in the first window

lucq --mode exec

This will activate the executor, waiting for the user to add a command.

Execute in the second window

We add the code or commands we want to execute sequentially in the second window or tmux.

Short command

lucq --add ls

Long command

lucq --add "test.py -a 1"

Specify executor

lucq --add test.py --executor /home/riko/venv/bin/python

Add command before id 3

lucq --add "test.py -a 1" --before 3

Add command after id 3

lucq --add "test.py -a 1" --after 3

Show progress

lucq --list
  • ๐Ÿ˜ or x means command is waiting
  • ๐Ÿ˜ or o means command was finished
  • ๐Ÿฅต or r means command is running
  • ๐Ÿ˜จ or e means command was error
  • ๐Ÿคก or c means command was canceled

Disable emoji show

lucq --list --noemoji

Delete command from queue

Use --list to find out command id (example 9) then

lucq --delete 9

Search

lucq --grep test.py

Clean database

LucQ use sqlite to store the command ($HOME/lucq.sql)

lucq --clean

lucq-rs's People

Contributors

rikonaka avatar

Watchers

 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.