I have an alias bed="vim ~/.bashrc && . ~/.bashrc"
in my .bashrc
. Now every now and then I'd like to run bed
but return the vim
with an exit status 1
so the source command doesn't execute.
Asked
Active
Viewed 1,937 times
1 Answers
20
Found the answer here : How to exit the Vim editor?
You can do :cq
to exit with a non-zero exit code.

Ealhad
- 1,912
- 20
- 27