为什么Ctrl-Z在Windows Git bash shell失败? [英] Why does Ctrl-Z on Windows Git bash shell fail?

查看:359
本文介绍了为什么Ctrl-Z在Windows Git bash shell失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有时需要在Windows中工作,这通常意味着使用Bash shell。如果我(例如)在 vim 不是 gvim ,我点击 Ctrl Z ,回到shell并执行一些操作,然后返回 vim ,而不是暂停我的 vim 过程Git Bash创建一个新的DOS shell。这是我想要的最后一件事。 Google搜索没有什么用(在这个时间点 - YMMV在我的未来)。
正在发生什么?

解决方案

我有时需要在Windows中工作, Git Bash shell。



很好。



如果我是(例如)在vim(不是gvim)打开几个文件,我打^ Z短暂回到shell并在返回vim之前做一些事情,而不是挂起我的vim进程Git Bash创建一个新的DOS shell。

如果你在git bash ,CTRL-Z也不会挂起它们。 Vim可以解决这个问题,而是创建一个shell来实现类似的结果。 Vim是一个工具在windows中不需要bash,而是windows命令提示符将必然安装在windows机器。我假设这是一个安全的选择的Windows二进制程序。



这是我想要的最后一件事。 Googling没有什么有用的(在这个时间点 - YMMV在我的未来)。这是怎么回事?



我猜这里是vim有CTRL-Z映射创建一个DOS shell。如果您要改为创建bash shell,可以键入:



:! sh



你将在一个bash shell中执行。


I sometimes have to work in Windows, which often means using the Bash shell. If I am (for example) in vim (not gvim) with several files open, and I hit CtrlZ to briefly go back to the shell and do something before returning to vim, instead of suspending my vim process Git Bash creates a new DOS shell. This is the last thing I'd ever want. Googling turns up nothing useful (at this point in time - YMMV in my future). What is going on?

解决方案

I sometimes have to work in Windows, which often means using the Git Bash shell.

Good. Me too.

If I am (for example) in vim (not gvim) with several files open, and I hit ^Z to briefly go back to the shell and do something before returning to vim, instead of suspending my vim process Git Bash creates a new DOS shell.

If you execute other processes in git bash, CTRL-Z won't suspend them either. Vim works around that and, instead, creates a shell to achieve a similar result. Vim is a tool in windows that doesn't require bash, rather the windows command prompt will be necessarily installed in a windows machine. I assume this is a safe choice of the windows binary program.

This is the last thing I'd ever want. Googling turns up nothing useful (at this point in time - YMMV in my future). What is going on?

My guess here is that vim has the CTRL-Z map to creating a DOS shell. If you want to create a bash shell instead, you can type:

:!sh

And you will be executing in a bash shell.

这篇关于为什么Ctrl-Z在Windows Git bash shell失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆