Skip to content

Commit

Permalink
chore: Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Weiler committed Nov 6, 2024
1 parent efc4dfb commit d2c975e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ up is a tiny shell function which lets you jump to a parent directory by its nam

* :zap: Lightning fast
* :keyboard: Bash completion for parent directory names
* :shell: Works with Bash and zsh
* :shell: Works with Bash and Zsh

## :gear: Installation

### git & Bash
### :shell: Git & Bash

Clone `up`'s git repository.
Clone `up`'s Git repository.

```sh
git clone https://github.com/helpermethod/up ~/.up
Expand All @@ -35,9 +35,9 @@ Add the following line to your `.bashrc` (Linux) or `.bash_profile` (macOS) to e
. "$HOME/.up/completion/bash/up"
```

### git & zsh
### :shell: Git & Zsh

Clone `up`'s git repository.
Clone `up`'s Git repository.

```sh
git clone https://github.com/helpermethod/up ~/.up
Expand Down
11 changes: 11 additions & 0 deletions completion/bash/up.bats
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ assert_contains() {
assert_contains main "${COMPREPLY[@]}"
}

@test '_up should not autocomplete the current directory name when given no arguments' {
mkdir -p "${BATS_TEST_TMPDIR}"/src/main/java
cd "${BATS_TEST_TMPDIR}"/src/main/java

COMP_WORDS=(up)
COMP_CWORD=1
_up

! assert_contains java "${COMPREPLY[@]}"
}

@test '_up should autocomplete the parent directory name' {
mkdir -p "${BATS_TEST_TMPDIR}"/src/main/java
cd "${BATS_TEST_TMPDIR}"/src/main/java
Expand Down

0 comments on commit d2c975e

Please sign in to comment.