Fix completion for zsh

* Fixes #54
This commit is contained in:
Lazarus Lazaridis 2019-06-02 10:06:54 +03:00
parent 0d076f234a
commit 7ee8375853
3 changed files with 10 additions and 5 deletions

View File

@ -5,6 +5,11 @@ All notable changes to `goto` will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [1.2.4.1] - 2019-06-02
### Fixed
- fix completion for zsh
## [1.2.4] - 2019-05-30
### Added

View File

@ -2,7 +2,7 @@
A shell utility allowing users to navigate to aliased directories supporting auto-completion :feet:
![Generic badge](https://img.shields.io/badge/version-1.2.4-green.svg)
![Generic badge](https://img.shields.io/badge/version-1.2.4.1-green.svg)
## How does it work?

View File

@ -111,7 +111,7 @@ USAGE
# Displays version
_goto_version()
{
echo "goto version 1.2.4"
echo "goto version 1.2.4.1"
}
# Expands directory.
@ -438,10 +438,10 @@ _complete_goto_zsh()
return $ret
}
aliases=($(alias | sed -n "s/.*\s\(.*\)='goto'/\1/p"))
aliases+=('goto')
goto_aliases=($(alias | sed -n "s/.*\s\(.*\)='goto'/\1/p"))
goto_aliases+=("goto")
for i in "${aliases[@]}"
for i in "${goto_aliases[@]}"
do
# Register the goto completions.
if [ -n "${BASH_VERSION}" ]; then