Skip to content

acorbe/any

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

  • git clone git@github.com:acorbe/any.git
  • cd any
  • ./install.sh

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.

Releases

No releases published

Packages

No packages published

Languages