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.
$ ls
workplace workfloor workaround
$ any cd around
expanded to: cd workaround
$ workaround/ _
$ any cat around
$ any emacs -nw around
In case the expansion is not unique, any prompts a selection menu in reverse cronological order.
$ any cat around/demo => cat workaround/my-demo
git clone [email protected]:acorbe/any.git
cd any
./install.sh
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
any cd
is aliased toad
by settingANY_ALIAS_CD=true
in your.bashrc
- Extensively tested with bash on linux
- Works on macos. Less features are supported, because of limited
find
functionalities.