original ↗
chrisdeluca.me·13w·
Discuss: Hacker News
git status -s | awk '{print $2}' | xargs your-editor

Replace your-editor with the command to launch, well, your editor. If you use a terminal editor, like Neovim, you’re all set. If you use a graphical editor, there may be some more setup.

The command breakdown:

  1. git status -s: Show all the modified files. The -s flag shortens the output to a single line per file. e.g. M path/to/your/file.js.
  2. awk '{print $2}': we pass each line to AWK, which…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help