Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 1.47 KB

README.md

File metadata and controls

59 lines (43 loc) · 1.47 KB

any - for bash

any <command> -flags.. file-keyword 

=>  <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

$ ls   
   workplace workfloor workaround
   
$ any cd around
    expanded to: cd workaround
$ workaround/ _

generic command expansion

$ any cat around
$ 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 /)

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

Installation

Via script (for systems with .bashrc)

Explicit

  • git clone [email protected]: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.