pushd和popd批处理_提示以及PushD和PopD

pushd和popd批处理

pushd和popd批处理

Let this post serve as a reminder to me (and you if you don't use it all the time) that PUSHD and POPD are available in Windows.

让这篇文章提醒我(如果您一直不使用它,您也可以),Windows中提供了PUSHDPOPD

Certainly TAB AutoCompletion is a goodness (it KILLS me when I have to watch someone, especially on stage, type long dirs and files one char at a time) and folks often forget that you can even do more tricky things like:

当然, TAB AutoCompletion是一种优势(当我不得不看别人时,尤其是在舞台上,打长辫子并一次输入一个字符,这让我很生气),人们常常忘记了您甚至可以做一些更棘手的事情,例如:

C:\TEMP>type my*.ofx (now PRESS TAB)

C:\ TEMP>输入my * .ofx (现在是PRESS TAB )

and get:

并获得:

C:\TEMP>type myfiledata.ofx

C:\ TEMP>输入myfiledata.ofx

but you can also

但是你也可以

C:\TEMP>pushd .C:\TEMP>cd "\Documents and Settings\shanselm\Desktop"
C:\Documents and Settings\shanselm\Desktop>popd
C:\TEMP>

C:\ TEMP>已推送。 C:\ TEMP> cd“ \ Documents and Settings \ shanselm \ Desktop” C:\ Documents和Settings \ shanselm \桌面> POPD C:\ TEMP>

Shawn Van Ness via Craig Andera make this tip even more useful when combined with their command PROMPT environment variable (Remember when "Customizing Your OS" consisted of 10-line long PROMPT statements in 4DOS? Ah, the good not-quite-old days.) From Craig's post:

通过Craig Andera的Shawn Van Ness与他们的命令PROMPT环境变量结合使用时,此技巧变得更加有用(请记住,“自定义操作系统”由4DOS中的10行长PROMPT语句组成吗? )从Craig的帖子中

$P$_$+$G

$ P $ _ $ + $ G

Which, when I set it via either the prompt command or the PROMPT environment variable, gives me a command line that looks like this:

当我通过提示命令或PROMPT环境变量进行设置时,会给我一个如下所示的命令行:

C:\data\Projects\flexwiki\FlexWikiCore
++>

C:\ data \ Projects \ flexwiki \ FlexWikiCore ++>

The plusses indicate that I'm two levels deep in pushd, and I like that the working directory appears on the line before, obliterating the problem of long paths making commands linewrap. Nice!

加号表示我在pushd中有两个层次,并且我喜欢工作目录出现在前面的行中,从而消除了使命令换行的长路径问题。 真好!

 What a nice series of tips for a random Thursday. Thanks guys!

随机星期四有一系列不错的提示。 谢谢你们!

翻译自: https://www.hanselman.com/blog/prompts-along-with-pushd-and-popd

pushd和popd批处理

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值