转到
1.5.3版
goto是一个神奇的工具,它可以让你想成为什么样的人。
当你参与不同的项目时,他们都有自己的文件夹、重要的文件、指向好文章或关键网站的链接。问题是所有这些都分布在不同的地方。
通过在goto中添加快捷方式,也就是所谓的神奇单词,您可以跳转到它们。
快捷方式与项目名称关联。您可以切换项目上下文
任何时候。
使用量$ project your-project
active project is now: your-project
$ goto add github https://github.com/user/your-project
Added magic word github
$ goto github
# opens https://github.com/user/your-project in your browser
设置
Mac OS-X/Linuxpip install magicgoto
安装后,关闭并重新打开终端。
Windows(使用Gitbash)
执行上述操作,但是open git bash as administrator
Linux-用户站点安装
在linux上,建议通过pip install --user magicgoto安装goto
这要求在路径中包含用户站点bin。
通常是~/.local/bin。所以添加PATH="${HOME}/.local/bin:$PATH"到
在大多数情况下,你的rcfile应该能做到这一点。
命令
转到
用于添加和跳转到快捷方式。The basics
goto Go to shortcut
goto add Add shortcut
goto update Update shortcut
goto rename Rename shortcut
goto rm Remove shortcut
goto show Show url of shortcut
goto list List all shortcuts
goto list -v With the urls printed
Working with folders and files
goto Goto will cd to a folder shortcut by default.
goto cd cd in terminal
goto open Open in finder/file explorer
Launching Code editors
goto subl Opens Sublime Text in code folder*
goto idea Opens IntelliJ in code folder*
goto vscode Opens Visual Studio Code in code folder*
* requires a magicword named code pointing to a folder.
goto add code
项目
用于添加和切换项目上下文。Usage: project [add ] | [list]
other commands:
add - adds a new project and makes it the active project.
rm - removes the project
list - lists all projects
deactivate - deactivates goto project
help - if you want to read this one more time.
如何知道哪个项目是活动的?
你用这个命令告诉goto:project
示例:project django-blogproject websiteproject goto$ project goto
active project is now: goto
不带参数运行project,将显示当前活动项目。$ project
goto
如何知道哪些项目存在?
你用命令告诉goto:project add
如何知道项目中有哪些捷径?
定义一次,使用一千次。通过此命令:goto add
magic word是快捷方式的名称。
uri是快捷方式的目标。它可以是一个文件、一个目录、一个web url。
示例:goto add github https://github.com/technocake/goto
goto add music ~/the/sound/of/music
goto add jira http://jira.com/project/X
第一种方法是向github上与项目相关的repo添加url。
第二个添加文件夹路径。
当你激活一个项目时,goto会记住你现在正在考虑的是哪个项目。
然后调用快捷方式visual studio是有意义的,因为它隐式表示与此项目关联的visualstudio项目。
示例:goto add jira http://jira.com/project/X
卸载pip uninstall magicgoto
# remove source start_goto from your ~/.bash_profile | ~/.bashrc | ~/.zshrc# project data is kept intact in ~/.goto
欢迎加入QQ群-->: 979659372
推荐PyPI第三方库