All Projects → fbeline → Luneta

fbeline / Luneta

Licence: gpl-2.0
command-line fuzzy finder

Programming Languages

bash
514 projects
d
599 projects

Projects that are alternatives of or similar to Luneta

Geo
🌎 A Bash utility for easy wan, lan, router, dns, mac address, and geolocation output, with clean stdout for piping
Stars: ✭ 225 (+359.18%)
Mutual labels:  cli, zsh, unix
Twf
Standalone tree view file explorer, inspired by fzf.
Stars: ✭ 196 (+300%)
Mutual labels:  cli, zsh, unix
Fzf
🌸 A command-line fuzzy finder
Stars: ✭ 40,965 (+83502.04%)
Mutual labels:  cli, zsh, unix
Data Science At The Command Line
Data Science at the Command Line
Stars: ✭ 3,174 (+6377.55%)
Mutual labels:  cli, unix, zsh
Dstask
Single binary terminal-based TODO manager with git-based sync + markdown notes per task
Stars: ✭ 431 (+779.59%)
Mutual labels:  cli, zsh
Jtc
JSON processing utility
Stars: ✭ 425 (+767.35%)
Mutual labels:  cli, unix
Mario
Powerful Python pipelines for your shell
Stars: ✭ 469 (+857.14%)
Mutual labels:  cli, unix
Autocomplete
Autocomplete for terminals on MacOS
Stars: ✭ 569 (+1061.22%)
Mutual labels:  cli, zsh
Libterm
iOS sandboxed terminal with Python, Lua and Clang
Stars: ✭ 348 (+610.2%)
Mutual labels:  cli, unix
Whipper
Python CD-DA ripper preferring accuracy over speed
Stars: ✭ 517 (+955.1%)
Mutual labels:  cli, unix
Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (+1175.51%)
Mutual labels:  cli, zsh
Yaspin
A lightweight terminal spinner for Python with safe pipes and redirects 🎁
Stars: ✭ 413 (+742.86%)
Mutual labels:  cli, unix
Dotfiles
My macOS environment: zsh, Git, Visual Studio Code, etc.
Stars: ✭ 405 (+726.53%)
Mutual labels:  zsh, unix
Awesome Shell
A curated list of awesome command-line frameworks, toolkits, guides and gizmos. Inspired by awesome-php.
Stars: ✭ 22,631 (+46085.71%)
Mutual labels:  cli, zsh
Cw
The best way to tail AWS CloudWatch Logs from your terminal
Stars: ✭ 368 (+651.02%)
Mutual labels:  cli, zsh
Imgur Screenshot
Take screenshot selection, upload to imgur. + more cool things
Stars: ✭ 540 (+1002.04%)
Mutual labels:  cli, unix
Dip
CLI gives the "native" interaction with applications configured with Docker Compose.
Stars: ✭ 737 (+1404.08%)
Mutual labels:  cli, zsh
Buildxl
Microsoft Build Accelerator
Stars: ✭ 676 (+1279.59%)
Mutual labels:  cli, unix
Ipt
Interactive Pipe To: The Node.js cli interactive workflow
Stars: ✭ 783 (+1497.96%)
Mutual labels:  cli, unix
Notes
📝 Simple delightful note taking, with more unix and less lock-in.
Stars: ✭ 939 (+1816.33%)
Mutual labels:  zsh, unix

luneta Build Status luneta

Luneta is an interactive command-line filter that can be applied to any list, e.g., cat $(ls | luneta)

render1588879971924

In this example, a list of files and folders are passed to luneta, which opens an interactive screen that allows users to fuzzy search through it. After an item gets selected luneta writes it to the stdout.

In short, it provides a convenient way to filter the data before passing it downstream.

(list) stdin -> luneta (interactive filter) -> stdout (selected value)

Although luneta was originally created to be used as a command-line tool, it can be integrated in other applications, e.g., Vim.

Characteristics

  • Fast
  • Small (~1mb binary)
  • Support for multiple line selection

Run luneta -h for help:

usage: luneta [options]
-v --version version
-q   --query default query to be used upon startup
-f  --filter do not start interactive finder, e.g -f="pattern"
    --height set the maximum window height (number of lines), e.g --height 25
     --color color support, e.g --color=FALSE
-h    --help This help information.

Installation

Brew

brew install fbeline/luneta/luneta

Snap

snap install luneta

Precompiled binaries

Releases - note: libncurses is required.

Manual Installation

Prerequisites:

git clone https://github.com/fbeline/luneta
cd luneta
dub build -b release --compiler ldc2

Usage

Search a command in your shell history:

fc -ln 1 | luneta

Checkout a git branch:

git branch 2>/dev/null | luneta | sed "s/.* //" | awk '{print $1}' | xargs git checkout

Kill an active process:

ps -e -o comm | luneta | xargs pkill

Refer to the examples for more.

Use with Vim

Just paste the code bellow in your .vimrc to use luneta as your file seaching tool.

" Run a given vim command on the results of fuzzy selecting from a given shell
" command. See usage below.
function! LunetaCommand(choice_command, vim_command)
  try
    let output = system(a:choice_command . " | luneta ")
  catch /Vim:Interrupt/
    " Swallow the ^C so that the redraw below happens; otherwise there will be
    " leftovers from luneta on the screen
    endtry
    redraw!
  if v:shell_error == 0 && !empty(output)
    exec a:vim_command . ' ' . output
  endif
endfunction

" Find all files in all non-dot directories starting in the working directory.
" Fuzzy select one of those and open the selected file.
nnoremap <leader>e :call LunetaCommand("find . -type f", ":e")<cr>
nnoremap <leader>v :call LunetaCommand("find . -type f", ":vs")<cr>
nnoremap <leader>s :call LunetaCommand("find . -type f", ":sp")<cr>

For better results is recommended to use tools like ag, rg, ack, etc.

nnoremap <leader>e :call LunetaCommand("ag . --silent -l", ":e")<cr>
nnoremap <leader>v :call LunetaCommand("ag . --silent -l", ":vs")<cr>
nnoremap <leader>s :call LunetaCommand("ag . --silent -l", ":sp")<cr>

*This vimscript is a modified version of the selecta.

Keyboard shorcuts

Key Action
CTRL + Space Select line and move to the next item
CTRL + n next selection
CTRL + p previous selection
CTRL + a beggining of the line
CTRL + e end of the line
CTRL + u erase all the character before and after the cursor
CTRL + d exit

License

GPL-2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].