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.
- Host: GitHub
- URL: https://github.com/acorbe/any
- Owner: acorbe
- License: mit
- Created: 2019-09-18T07:07:13.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-23T10:18:32.000Z (almost 3 years ago)
- Last Synced: 2025-03-28T04:41:42.650Z (3 months ago)
- Topics: bash, bash-completion, bash-prompt, shell-extension
- Language: Shell
- Homepage:
- Size: 411 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
### 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.