Skip to content

在 command line 中 undo 和 redo #73

@hawtim

Description

@hawtim

背景

最近在做项目技术重构,经常需要 git fetch 上游的分支,再 git merge 上游的分支,有非常多基于 command line 的操作,很容易出错。

比如 git fetch 然后 command + v 贴错了粘贴板里的东西,之前我的处理方式是,ctrl + c 取消当前的命令然后重新输入。

平时这样的开销觉得还好,但是频繁的操作下,这样的开销累积起来就不少了。

有没有快捷键可以 undo 最近的输入?

有的,bash-zsh-undo-erase-backwards-ctrlw

  • Undo 即 ctrl + w
  • Redo 即 ctrl + shift + -

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions