Last active
September 17, 2018 13:37
-
-
Save astyagun/952cb3b61b2d7d5e5d95b722d95bf428 to your computer and use it in GitHub Desktop.
Use Vim in shell piped command chains
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Use Vim in shell piped command chains | |
# https://gist.github.com/astyagun/952cb3b61b2d7d5e5d95b722d95bf428 | |
(vim - -esbnN -c "$@" -c 'w!/dev/fd/3|q!' >/dev/null) 3>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment