https://github.com/beoliver/jump
Jump around your filesystem
https://github.com/beoliver/jump
bookmarks navigation terminal
Last synced: 10 months ago
JSON representation
Jump around your filesystem
- Host: GitHub
- URL: https://github.com/beoliver/jump
- Owner: beoliver
- Created: 2021-04-17T20:21:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-26T19:07:38.000Z (about 3 years ago)
- Last Synced: 2025-01-29T06:48:57.664Z (12 months ago)
- Topics: bookmarks, navigation, terminal
- Language: Shell
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jump
**j**(ump) around your filesystem.
```
j [NAME] [OPTION] ...
```
This is a simple program (it's just a shell script) that lets you associate directory paths with memorable names. You can then use these names to quickly change directory.
Add an alias using the `-a` flag.
```
j -a
```
Type the alias to change directory.
```
j
```
# installation
1. Download the `jump.sh` script.
2. Run the command `jump.sh`.
This will create a directory `$HOME/.config/jump` that will contain a sqlite database file used to store the aliases and paths.
A function will be printed to stdout that can be pasted into your `.bash_profile` or similar.
```
$ ./jump.sh
Create '/Users/beoliver/.config/jump' [y/N]
y
# The following function can be pasted into your shell profile.
# calling the 'j' command with a single alias name is equivalent to calling
# 'cd' on the path asociated with the alias.
j () {
_jump_result="$(/Users/beoliver/jump.sh ${@})"
if [ ${#} -eq 1 ]; then
if case ${1} in -*) false;; *) true;; esac; then
cd "$_jump_result" && return
fi
fi
echo "$_jump_result"
}
_jump_completions() {
COMPREPLY=()
local word="${COMP_WORDS[COMP_CWORD]}"
if [ "$COMP_CWORD" -eq 1 ]; then
COMPREPLY=($(compgen -W "$(/Users/beoliver/jump.sh)" -- "$word"))
fi
}
complete -F _jump_completions j
```