项目作者: acorbe

项目描述 :
Keyword-based shell navigation. For Bash.
高级语言: Shell
项目地址: git://github.com/acorbe/any.git
创建时间: 2019-09-18T07:07:13Z
项目社区:https://github.com/acorbe/any

开源协议:MIT License

下载


any - for bash

  1. any <command> -flags.. file-keyword
  2. => <command> -flags.. filename-matching-keyword

In case file-keyword allows for more than one matching, a selection menu is prompted.

When the file/folder name includes a known keyword but bash autocompletion cannot help, any saves the pain. Any extensively uses the find command.

© Alessandro Corbetta, 2019.

Example

demo-video

cd keyword expansion

  1. $ ls
  2. workplace workfloor workaround
  3. $ any cd around
  4. expanded to: cd workaround
  5. $ workaround/ _

generic command expansion

  1. $ any cat around
  2. $ any emacs -nw around

not unique expansion

In case the expansion is not unique, any prompts a selection menu in reverse cronological order.

complex folder pattern expansion (separated by /)

  1. $ any cat around/demo => cat workaround/my-demo

Installation

Via script (for systems with .bashrc)

Explicit

  • git clone git@github.com:acorbe/any.git
  • Add source <path-to>/any/any-bash.sh into your ~/.bashrc (for standard linux) or ~/.bash_profile (for macos).
  • (optional) export ANY_ALIAS_CD=true

Aliases

  • any cd is aliased to ad by setting ANY_ALIAS_CD=true in your .bashrc

Supported systems

  • Extensively tested with bash on linux
  • Works on macos. Less features are supported, because of limited find functionalities.