Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference function rather than alias #10

Open
martindsouza opened this issue Jun 5, 2020 · 0 comments
Open

Reference function rather than alias #10

martindsouza opened this issue Jun 5, 2020 · 0 comments
Assignees

Comments

@martindsouza
Copy link
Owner

aliases don't behave the same when running as bash scripts. This is especially true with multi line definitions of a docker run command. Instead use a bash function. Ex:

# Note the $@ passes in all args to the function
sqlcl() {
  docker run -it --rm \
    --network="host" \
    -v `pwd`:/sqlcl \
    -v ~/Documents/Oracle/:/oracle \
    -e TNS_ADMIN=$TNS_ADMIN \
    oracle-sqlcl:latest \
    $@
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant