An open API service indexing awesome lists of open source software.

https://github.com/acorbe/any

Keyword-based shell navigation. For Bash.
https://github.com/acorbe/any

bash bash-completion bash-prompt shell-extension

Last synced: 2 months ago
JSON representation

Keyword-based shell navigation. For Bash.

Awesome Lists containing this project

README

        

# any - for bash
```
any -flags.. file-keyword

=> -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](/docs/any-video-4.gif)

### cd keyword expansion
```bash
$ ls
workplace workfloor workaround

$ any cd around
expanded to: cd workaround
$ workaround/ _
```

### generic command expansion
```bash
$ 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 `/`)
```bash
$ any cat around/demo => cat workaround/my-demo
```

## Installation
### Via script (for systems with `.bashrc`)
+ `git clone [email protected]:acorbe/any.git`
+ `cd any`
+ `./install.sh`

### Explicit
+ `git clone [email protected]:acorbe/any.git`
+ Add `source /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.