Skip to content

Instantly share code, notes, and snippets.

@amielucha
Created March 6, 2018 10:27
Show Gist options
  • Select an option

  • Save amielucha/43a42791f9e9f1b9799539672ffc3983 to your computer and use it in GitHub Desktop.

Select an option

Save amielucha/43a42791f9e9f1b9799539672ffc3983 to your computer and use it in GitHub Desktop.
PowerShell function accepting parameters
# This function passes up to 9 chained params to `wpcli` on docker in the current directory.
# I haven't figured out how to spread an undefined amount of parameters yet...
# Simply call "wp help", "wp post list" etc.
function wp($p1, $p2, $p3, $p4, $p5, $p6, $p7, $p8, $p9) { docker-compose run --rm wpcli $p1 $p2 $p3 $p4 $p5 $p6 $p7 $p8 $p9 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment