mirror of
https://github.com/iridakos/goto.git
synced 2025-05-16 07:20:17 -07:00
Fix shellcheck errors and warnings.
This commit is contained in:
parent
2db8b0bf1f
commit
a5b88497d1
10
goto.sh
10
goto.sh
@ -221,22 +221,22 @@ _goto_unregister_alias()
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Pushes the current directory onto the stack, then goto
|
# Pushes the current directory onto the stack, then goto
|
||||||
function _goto_directory_push()
|
_goto_directory_push()
|
||||||
{
|
{
|
||||||
if [ "$#" -ne "1" ]; then
|
if [ "$#" -ne "1" ]; then
|
||||||
_goto_error "usage: goto -p|--push <alias>"
|
_goto_error "usage: goto -p|--push <alias>"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd . 2>&1 1>/dev/null
|
{ pushd . || return; } 1>/dev/null 2>&1
|
||||||
|
|
||||||
_goto_directory $@
|
_goto_directory "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pops the top directory from the stack, then goto
|
# Pops the top directory from the stack, then goto
|
||||||
function _goto_directory_pop()
|
_goto_directory_pop()
|
||||||
{
|
{
|
||||||
popd 2>&1 1>/dev/null
|
{ popd || return; } 1>/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Unregisters aliases whose directories no longer exist.
|
# Unregisters aliases whose directories no longer exist.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user