跳转位置-更改目录(CD)PowerShell命令,可让您读懂

There's a lovely little utility called autojump for *nix consoles that makes the 'cd' command very smart. More that just auto-completion, it's a kind of "auto guessing." Hence, autojump. There is some beginning Windows support, but instead I turned to Tim Kellogg's open source PowerShell implementation "Jump-Location."

* nix控制台有一个可爱的小实用程序,称为autojump ,使'cd'命令非常智能。 不仅仅是自动完成,更是一种“自动猜测”。 因此,自动跳转。 Windows有一些开始的支持,但是我转而使用了Tim Kellogg的开源PowerShell实现“ Jump-Location”

What a joy.

太高兴了

j this and j that

First, I was like "jump-location?" I'm not going to type that. But then, of course, duh. Aliases.

首先,我就像“跳转位置?” 我不会打那个。 但是,当然,du。 别名。

Jump-Location is aliased to just j, which means I can now do awesome stuff like this:

Jump-Location仅别名为j ,这意味着我现在可以做这样的出色工作:

c:\> j sc
c:\users\scott> j g
c:\users\AppData\Local\GitHub> j des
c:\users\scott\Desktop>

But there's more. It's actually watching how long you are in a directory and keeping stats. You can see the weighted stats with "jumpstat" and the "database" is just a text file in ~\jump-location.txt.

但是还有更多。 它实际上是在监视您在目录中的时间并保留统计信息。 您可以使用“ jumpstat”看到加权统计信息,而“数据库”只是〜\ jump-location.txt中的文本文件。

If "j d" isn't enough to get me into C:\GitHub\DisProject then I can do "j g d" and I'm there. It's amazing.

如果“ jd”不足以使我进入C:\ GitHub \ DisProject,那么我可以执行“ jgd”,并且我在那。 太奇妙了。

Installation is easy, and I hope it gets on PsGet soon for even easier installation. Just unzip, unblock, ensure that your PowerShell execution policy allows scripts, and run ./install.ps1.

安装很容易,我希望它能尽快在PsGet使用,以使安装更加容易。 只需解压缩,取消阻止,确保您的PowerShell执行策略允许脚本并运行./install.ps1。

NOTE: Don't run install from your desktop, or a temp folder. Put the Jump-Location folder somewhere where it will live, and it's going to add a line like this to your user profile ("C:\Users\YOU\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1")  like this, so you'll want to install from a final path:

注意:请勿从桌面或临时文件夹运行安装。 将Jump-Location文件夹放在将要保存的位置,然后将这样的行添加到用户配置文件中(“ C:\ Users \ YOU \ Documents \ WindowsPowerShell \ Microsoft.PowerShell_profile.ps1”),这样,您想要从最终路径安装:

Import-Module 'C:\Users\Scott\Dropbox\utils\Jump-Location-0.5.1\Jump.Location.psd1'

I'm excited about this great little utility. Head over to https://github.com/tkellogg/Jump-Location and STAR it in GitHub, and give it a go! Tim, the author, is on Twitter at @kellogh. Other contributors include Sergey Vorobyev.

我为这个伟大的小工具感到兴奋。 前往https://github.com/tkellogg/Jump-Location并在GitHub中对其加注星标,然后尝试一下! 作者蒂姆(Tim)在Twitter上@kellogh 。 其他贡献者包括Sergey Vorobyev

翻译自: https://www.hanselman.com/blog/jumplocation-a-change-directory-cd-powershell-command-that-reads-your-mind

  • 0
    点赞
  • 1
    收藏
  • 0
    评论

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

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页
评论
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值