mirror of
https://github.com/iridakos/goto.git
synced 2025-05-16 07:20:17 -07:00
Adds auto-completion and documentation for expand command
This commit is contained in:
parent
21c3b66a77
commit
df46ea166b
20
README.md
20
README.md
@ -111,6 +111,26 @@ or
|
||||
goto --list
|
||||
```
|
||||
|
||||
### Expand an alias
|
||||
|
||||
To expand an alias to its value, use:
|
||||
```bash
|
||||
goto -x <alias>
|
||||
```
|
||||
or
|
||||
```bash
|
||||
goto --expand <alias>
|
||||
```
|
||||
|
||||
#### Example
|
||||
```bash
|
||||
goto -x last_release
|
||||
```
|
||||
or
|
||||
```bash
|
||||
goto --expand last_release
|
||||
```
|
||||
|
||||
### Cleanup
|
||||
|
||||
To cleanup the aliases from directories that are no longer accessible in your filesystem, use:
|
||||
|
@ -309,7 +309,10 @@ function _complete_goto()
|
||||
prev="${COMP_WORDS[1]}"
|
||||
|
||||
if [[ $prev = "-u" ]] || [[ $prev = "--unregister" ]]; then
|
||||
# prompt with aliases only if user tries to unregister one
|
||||
# prompt with aliases if user tries to unregister one
|
||||
_complete_goto_aliases "$cur"
|
||||
elif [[ $prev = "-x" ]] || [[ $prev = "--expand" ]]; then
|
||||
# prompt with aliases if user tries to expand one
|
||||
_complete_goto_aliases "$cur"
|
||||
fi
|
||||
elif [ "$COMP_CWORD" -eq "3" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user