File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -29,15 +29,33 @@ Add the following line to your `.bashrc` (Linux) or `.bash_profile` (macOS) to i
2929. " $HOME /.up/up"
3030```
3131
32- Add the following line to your ` .bashrc ` (Linux) or ` .bash_profile ` (macOS) to enable ` up ` 's Bash completion.
32+ Add the following line to your ` .bashrc ` (Linux) or ` .bash_profile ` (macOS) to enable ` up ` 's shell completion.
3333
3434``` sh
3535. " $HOME /.up/completion/bash/up"
3636```
3737
3838### git & zsh
3939
40- TBD
40+ Clone ` up ` 's git repository.
41+
42+ ``` sh
43+ git clone https://github.com/helpermethod/up ~ /.up
44+ ```
45+
46+ Add the following line to your ` .zshrc ` to install ` up ` .
47+
48+ ```
49+ . "$HOME/.up/up"
50+ ```
51+
52+ Add the following lines to your ` .zshrc ` to enable ` up ` 's shell completion.
53+
54+ ``` sh
55+ autoload -U +X compinit && compinit
56+ autoload -U +X bashcompinit && bashcompinit
57+ . " $HOME /.up/completion/bash/up"
58+ ```
4159
4260## Usage
4361
Original file line number Diff line number Diff line change 55 local -r pwd_without_leading_slash=${PWD: 1}
66
77 local basenames=()
8- IFS=/ read -r -a basenames <<< " ${pwd_without_leading_slash%/*}"
8+ while IFS= read -r -d/; do
9+ basenames+=(" $REPLY " )
10+ done <<< " $pwd_without_leading_slash"
911
1012 [[ $PWD != / ]] && basenames+=(/)
1113
You can’t perform that action at this time.
0 commit comments