Skip to content

Commit

Permalink
improve code style
Browse files Browse the repository at this point in the history
  • Loading branch information
a1346054 committed Aug 13, 2021
1 parent 973274c commit ee429ea
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions bd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
usage_error () {
usage_error() {
cat << EOF
------------------------------------------------------------------
Name: bd
Expand Down Expand Up @@ -33,19 +33,16 @@ newpwd() {
esac
}

if [ $# -eq 0 ]
then
if [ $# -eq 0 ]; then
usage_error
elif [ "${@: -1}" = "-v" ]
then
elif [ "${@: -1}" = "-v" ]; then
usage_error
else
oldpwd=$(pwd)

newpwd "$oldpwd" "$@"

if [ "$NEWPWD" = "$oldpwd" ]
then

if [ "$NEWPWD" = "$oldpwd" ]; then
echo "No such occurrence."
else
echo "$NEWPWD"
Expand Down

0 comments on commit ee429ea

Please sign in to comment.