I want to delete a helm instance using an alias, to which I can append a named instance and this is added to the command and run.
I have the following in my .zshrc file
alias helmd='function __helmd() {echo "helm delete $* --tiller-namespace=this-is-for-stack-uat --purge"; unset -f __helmd; }; __helmd'
When I type
helmd delete-this-instance
I get
helm delete delete-this-instance --tiller-namespace=this-is-for-stack-uat --purge
Which is the expected output, however the helm delete command isnt run, instead it prints the string out and then shows the cursor so I can start typing commands. What I want it to do is run the function so that the instance is deleted.
As @Aaron mentions, just run the command, don't echo it.
alias helmd='function __helmd() {helm delete $* --tiller-namespace=this-is-for-stack-uat --purge; unset -f __helmd; }; __helmd'