【保姆级教程】Windows Terminal设置在当前目录打开

【保姆级教程】Windows Terminal设置在当前目录打开

最近我在研究windows下的命令行工具的多Tab页功能。选择了Windows Terminal自从发布以来备受好评,它的功能简单且具有很强的扩展性,给人一种类似VS Code的感觉。然而,我习惯了使用Shift+右键在当前目录打开命令窗口(通常是PowerShell窗口),我在想是否可以实现类似的效果,即在Windows Terminal中右键菜单中也能够打开命令窗口,并自动切换到当前目录。这样就能更方便地在Windows Terminal中进行命令行操作了。

预览效果

先来看下要达成的效果

在这里插入图片描述

操作步骤

1、win+R 输入 regedit

2、找到 计算机\HKEY_CLASSES_ROOT\Directory\Background\shell

复制路径直达跳转

3、右键 > 新建 > 项,名称填写 “在此处打开 Terminal(窗口)”

请添加图片描述

4、在新建的 “在此处打开 Terminal(窗口)” 上右键 > 新建 > 项,名称填写“command”,

将 (默认) 值修改为

cmd /c set CURRENT_PATH="%V" & start D:\wushaopeng\Microsoft.WindowsTerminalPreview_1.19.3172.0_x64\terminal-1.19.3172.0\wt.exe

其中 D:\wushaopeng\Microsoft.WindowsTerminalPreview_1.19.3172.0_x64\terminal-1.19.3172.0\wt.exe 是 Windows Terminal 的安装目录可执行文件地址。

请添加图片描述

5,修改windowsTerminal 配置

请添加图片描述

  • 22
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
这是一个window下的annroid平台工具,主要用于android的应用开发,还可以用于手机刷机,完整的fastboot命令功能,是2017年官方的最新版本。 此工具适用于华为和其他品牌的手机。 工具使用实例: 使用fastboot工具刷入recovery.img、boot.img、system.img等 下载解压:fastboot工具 解压FastBoot工具.zip ,将解压得到的 FastBoot文件夹复制到任意盘如:D盘,,将要刷入手机的recovery.img、recovery.img等放到FastBoot文件夹 安装好手机型号对应的USB驱动,手机进入fastboot模式 打开cmd,进入fastboot文件所在目录 cd /d d:\fastboot 刷recovery.img: fastboot flash recovery recovery.img 或 fastboot.exe flash recovery recovery.img   如果img文件名为:recovery5.0.img,命令则是: fastboot.exe flash recovery recovery5.0.img 或 更名recovery.img用对应命令刷入即可。   刷system.img: fastboot flash system system.img   重启手机命令: fastboot.exe reboot   fastboot刷入命令格式:fastboot flash 系统分区 对应的name.img   用批处理更方便,如果名字不是recovery.img重命名为recovery.img或修改批处理,下面的批处理都是刷命名为:recovery.img system.img boot.img的   批处理:将下载的recovery5.0.img等文件命名为recovery.img、system.img 双击对应批处理可直接刷入recovery.img boot.img等 .bat 批处理可用TXT记事本打开修改!   Android系统的分区为:system分区对应的目录 /system ,userdata分区对应 /data ,cache分区对应 /cache , 可用ADB 或超终端 通过命令查看系统分区,命令如下: su cat /proc/mtd 假设mtd1对应 boot分区,mtd2对应system分区,备份导出boot.img与system.img命令如下: cat /dev/mtd/mtd1 > /sdcard/boot.img cat /dev/mtd/mtd2 > /sdcard/system.img   /data刷入命令是, 文件名为userdata.img : fastboot flash userdata userdata.img 或 文件名为data.img fastboot flash userdata data.img
好的,下面是一个基于Python的BBS论坛保姆教程,适用于Windows操作系统。 首先,你需要安装Python和一些必要的库。推荐使用Anaconda或Miniconda,因为它们包含了常用的Python库。在命令行中输入以下命令来安装Flask和SQLAlchemy: ``` pip install Flask pip install SQLAlchemy ``` 接下来,你需要创建一个Flask应用程序。在你的工作目录中创建一个名为`app.py`的文件,并输入以下代码: ```python from flask import Flask, render_template, request, redirect, url_for from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///bbs.db' db = SQLAlchemy(app) class Post(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String(80)) content = db.Column(db.Text) author = db.Column(db.String(50)) def __repr__(self): return '<Post %r>' % self.title @app.route('/') def index(): posts = Post.query.all() return render_template('index.html', posts=posts) @app.route('/post/<int:id>') def post(id): post = Post.query.get(id) return render_template('post.html', post=post) @app.route('/new_post', methods=['GET', 'POST']) def new_post(): if request.method == 'POST': title = request.form['title'] content = request.form['content'] author = request.form['author'] post = Post(title=title, content=content, author=author) db.session.add(post) db.session.commit() return redirect(url_for('index')) return render_template('new_post.html') if __name__ == '__main__': app.run(debug=True) ``` 这个应用程序使用了Flask和SQLAlchemy,定义了一个名为`Post`的数据库模型,并创建了三个路由函数。`index`函数会渲染主页,`post`函数会渲染帖子页面,`new_post`函数会渲染新帖子页面,并将新帖子添加到数据库中。 接下来,你需要创建模板。在你的工作目录中创建一个名为`templates`的文件夹,并在其中创建三个HTML文件:`index.html`、`post.html`和`new_post.html`。 `index.html`模板: ```html <!doctype html> <html> <head> <title>BBS</title> </head> <body> <h1>BBS</h1> <ul> {% for post in posts %} <li><a href="{{ url_for('post', id=post.id) }}">{{ post.title }}</a> by {{ post.author }}</li> {% endfor %} </ul> <a href="{{ url_for('new_post') }}">New Post</a> </body> </html> ``` `post.html`模板: ```html <!doctype html> <html> <head> <title>{{ post.title }}</title> </head> <body> <h1>{{ post.title }}</h1> <p>{{ post.content }}</p> <p>by {{ post.author }}</p> <a href="{{ url_for('index') }}">Back to Index</a> </body> </html> ``` `new_post.html`模板: ```html <!doctype html> <html> <head> <title>New Post</title> </head> <body> <h1>New Post</h1> <form method="post"> <label for="title">Title:</label> <input type="text" id="title" name="title"><br><br> <label for="content">Content:</label> <textarea id="content" name="content"></textarea><br><br> <label for="author">Author:</label> <input type="text" id="author" name="author"><br><br> <input type="submit" value="Submit"> </form> <a href="{{ url_for('index') }}">Back to Index</a> </body> </html> ``` 最后,你需要创建一个SQLite数据库。在命令行中输入以下命令: ``` python from app import db db.create_all() exit() ``` 现在你可以运行应用程序了。在命令行中输入以下命令: ``` python app.py ``` 然后在浏览器中访问`http://localhost:5000`即可。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值