mirror of
https://github.com/iridakos/goto.git
synced 2025-05-15 23:10:35 -07:00
parent
0b3b8527a9
commit
19393468fc
8
goto.sh
8
goto.sh
@ -25,7 +25,7 @@
|
||||
function goto()
|
||||
{
|
||||
local target
|
||||
GOTO_DB="$HOME/.goto"
|
||||
_goto_resolve_db
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
# display usage and exit when no args
|
||||
@ -61,6 +61,11 @@ function goto()
|
||||
return $?
|
||||
}
|
||||
|
||||
function _goto_resolve_db()
|
||||
{
|
||||
GOTO_DB="$HOME/.goto"
|
||||
}
|
||||
|
||||
function _goto_usage()
|
||||
{
|
||||
cat <<\USAGE
|
||||
@ -268,6 +273,7 @@ function _complete_goto_commands()
|
||||
function _complete_goto_aliases()
|
||||
{
|
||||
local IFS=$'\n' matches
|
||||
_goto_resolve_db
|
||||
|
||||
# shellcheck disable=SC2207
|
||||
matches=($(sed -n "/^$1/p" "$GOTO_DB" 2>/dev/null))
|
||||
|
Loading…
x
Reference in New Issue
Block a user