Skip to content

Commit

Permalink
Update up shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
tedbauer committed Apr 27, 2024
1 parent cbd50b7 commit f3dc6af
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
11 changes: 9 additions & 2 deletions Formula/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
binary_path="$(brew --prefix)/lib/up-path-gen"

up() {
path="$binary_path" "$@"
cd $path
if [ $# -eq 0 ]; then
echo "Usage: up <argument>"
return 1
fi

target_path="$1"
full_command="$binary_path $target_path"

"$full_command"
}
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🦘 up

Jump up multiple directory levels.
A

```bash
$ pwd
Expand All @@ -24,4 +24,13 @@ $ pwd
$ up lon
$ pwd
/simple/path/example/hello/longerstring
```

## Installation

With [Homebrew](https://brew.sh/):

```shell
brew tap tedbauer/homebrew-up
brew install tedbauer/homebrew-up/up
```

0 comments on commit f3dc6af

Please sign in to comment.