Skip to content

Reference function rather than alias #10

@martindsouza

Description

@martindsouza

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 \
    $@
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions