https://github.com/shannonmoeller/up
Quickly navigate to a parent directory via tab-completion.
https://github.com/shannonmoeller/up
alias bash fish navigation shell tab-completion zsh
Last synced: 6 months ago
JSON representation
Quickly navigate to a parent directory via tab-completion.
- Host: GitHub
- URL: https://github.com/shannonmoeller/up
- Owner: shannonmoeller
- License: mit
- Created: 2011-09-28T13:53:20.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2020-07-26T12:54:45.000Z (over 5 years ago)
- Last Synced: 2024-12-10T12:37:44.018Z (12 months ago)
- Topics: alias, bash, fish, navigation, shell, tab-completion, zsh
- Language: Shell
- Homepage:
- Size: 12.7 KB
- Stars: 174
- Watchers: 8
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-shell - up - Ascend directories by name or count; for bash, zsh, and fish. (Command-Line Productivity / Directory Navigation)
- fucking-awesome-shell - up - Ascend directories by name or count; for bash, zsh, and fish. (Command-Line Productivity / Directory Navigation)
README
# `up`
Stop typing `../../..` endlessly. Use tab completion instead! Using `up` allows you to change your current directory to a parent of the current directory where the parent is specified by name or index.
## Install
Written in 100% shell script, `up.sh` registers the `up` function and some completion functions via your `.bashrc` or `.zshrc` file.
### bash
```
curl --create-dirs -o ~/.config/up/up.sh https://raw.githubusercontent.com/shannonmoeller/up/master/up.sh
echo 'source ~/.config/up/up.sh' >> ~/.bashrc
```
### zsh
```
curl --create-dirs -o ~/.config/up/up.sh https://raw.githubusercontent.com/shannonmoeller/up/master/up.sh
echo 'source ~/.config/up/up.sh' >> ~/.zshrc
```
### fish
Written in 100% fish script, `up.fish` registers the `up` function and some completion functions via `funcsave`.
```
curl --create-dirs -o ~/.config/up/up.fish https://raw.githubusercontent.com/shannonmoeller/up/master/up.fish
source ~/.config/up/up.fish
```
## Usage
```
$ up [dir|num|-]
dir full or partial name of any parent directory
num number of times you'd have to type `../`
- previous working directory
```
## Examples
Up one level:
```
/home/chuck/foo/bar/baz/head/foot $ up
/home/chuck/foo/bar/baz/head $
```
Up multiple levels:
```
/home/chuck/foo/bar/baz/head/foot $ up 4
/home/chuck/foo $
```
Up by full name:
```
/home/chuck/foo/bar/baz/head/foot $ up bar
/home/chuck/foo/bar $
```
Up by partial name:
```
/home/chuck/foo/bar/baz/head/foot $ up ba
/home/chuck/foo/bar/baz $
```
Tab completion:
```
/home/chuck/foo/bar/baz/head/foot $ up
bar/ baz/ chuck/ foo/ head/ home/
/home/chuck/foo/bar/baz/head/foot $ up h
head/ home/
/home/chuck/foo/bar/baz/head/foot $ up ho
/home/chuck/foo/bar/baz/head/foot $ up home/
/home $
```
----
MIT © [Shannon Moeller](http://shannonmoeller.com)