ubuntu22-安装vscode-配置shell命令环境-mac安装

文章目录

1.安装vscode

从官网下载安装包Code_1.93.1-1726079302_amd64.deb。

在ubuntu系统中,安装包所在目录打开命令行工具,输入:

bash 复制代码
udo dpkg -i code_1.93.1-1726079302_amd64.deb

中间点一个yes。

执行以下命令即可运行VS Code:

bash 复制代码
code

2.修改语言为中文

可以执行,相关文章。
https://plugin.blog.csdn.net/article/details/138569823

3.配置bash调试环境

3.1.安装插件

Bash Debug 调试插件

Shellman格式化插件

shellcheck 语法错误检查

shell-format 右键格式化文档

Code Runner 文档右键运行

3.2.添加配置文件

javascript 复制代码
{
    "workbench.colorTheme": "Default Light Modern",
    "launch": {
        "configurations": [
        {
            "type": "bashdb",
            "request": "launch",
            "terminalKind": "integrated" ,
            "name": "Bash-Debug (simplest configuration)",
            "cwd": "${workspaceFolder}",
            "program": "${file}",
            "args": []
        }
        ]
    }
}

4.调试bash

4.1.新建tmp.sh文件

编辑简单的待打印的内容

bash 复制代码
echo "1"
echo "2"
echo "3"

4.2.运行启动

调试运行。

5.mac安装

bash 复制代码
#!/bin/sh
CopyDirToDst() {
    # echo $1
    dirt=$1
    echo "$dirt"
    dirlan=$(ls "$dirt")
    echo "$dirlan"

    for file in $dirlan; do
        srcfile=$dirt/$file/
        dstdir=$2/$file
        echo "$srcfile" "$dstdir"

        # mkdir $dstdir
        if test -f "$file"; then
            echo "file"
        else
            # 文件夹则复制到目标文件夹 存在则强制替换
            cp -R -f "$srcfile" "$dstdir"
        fi
    done
}
CopyDirToDst ./extension /home/zhiliao/Documents/test

# sudo sh installmac.sh

6.mac卸载

bash 复制代码
#!/bin/sh
uninstall() {
    # echo $1
    dirt=$1
    echo "$dirt"
    dirlan=$(ls "$dirt")
    echo "$dirlan"

    for file in $dirlan; do
        srcfile=$dirt/$file/
        strA=$file
        strB="ZhiLiaoPlugins"
        result=$(echo "$strA" | grep "${strB}")
        # shellcheck disable=SC3010
        if [[ "$result" != "" ]]; then
            echo "delete" "$srcfile"
            rm -R "$srcfile"
        fi        
    done
}
uninstall /home/zhiliao/Documents/test

# sudo sh uninstallmac.sh
相关推荐
wdfk_prog6 小时前
正常关闭虚拟机时,不要点“关机”,而要点“关闭客户机”
linux·c语言·网络·ide·vscode
摇滚侠11 小时前
软件开发外包项目组,如何提高代码质量和开发效率
java·开发语言·前端·ide·intellij-idea
古怪今人12 小时前
Windows系统+VSCode 开发Python和Java项目 AI代码编辑器Trae插件安装
ide·vscode·编辑器
EM-FF14 小时前
idea快捷键
java·ide·intellij-idea
2601_9583205714 小时前
【详细版教程】Windows/macOS/Linux 安装 OpenClaw 2.6.6 指南(包含安装包)
linux·运维·windows·macos·小龙虾·open claw一键安装
HackTwoHub14 小时前
可视化未授权访问批量探测工具、支持批量目标、并发扫描、SOCKS5 全局代理、CSV 导出
linux·windows·macos·网络安全·网络攻击模型
铁皮哥16 小时前
【后端开发】@Resource 和 @Autowired 到底有什么区别?为什么现在更推荐构造方法注入?
java·ide·spring boot·tomcat·log4j·idea·intellij idea
Allen Su16 小时前
【Mac 教程系列第 19 篇】如何将 macOS 中的 Microsoft AutoUpdate 软件从系统中删除
microsoft·macos·autoupdate
花花鱼17 小时前
android studio 图标的使用及处理
android·ide·android studio
丝雨_xrc17 小时前
Minimax M2.7 多模态应用落地实战指南
ide·macos·xcode