I am trying to create an alias for this docker command:
docker ps -a --format="table {{ .Names }} \t {{ .Image }} \t {{ .Status }} \t {{ .Ports }}"
I'm using zsh so I added this to my .zshrc file:
alias dockerps = 'docker ps -a --format="table {{ .Names }} \\t {{ .Image }} \\t {{ .Status }} \\t {{ .Ports }}"'
I' ve also tried escaping the double quotes \", but every time I try to finish with the compile
. ~/.zshrc
it results in
/home/USER/.zshrc:129: bad assignment
EDIT: removing the spaces around alias : alias dockerps = xx... --> alias dockerps=xx... fixed it