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
相关推荐
花间相见2 小时前
【终端效率工具01】—— Yazi:Rust 编写的现代化终端文件管理器,告别繁琐操作
前端·ide·git·rust·极限编程
Webgiserin4 小时前
nvm+vscode配置安装暂记
ide·vscode·编辑器
00后程序员张4 小时前
完整教程:如何将iOS应用程序提交到App Store审核和上架
android·macos·ios·小程序·uni-app·cocoa·iphone
charlie1145141915 小时前
嵌入式C++工程实践——第13篇:第一次重构 —— enum class取代宏,类型安全的开始
开发语言·c++·vscode·stm32·安全·重构·现代c++
小河豚oO5 小时前
2. 初识 LLM API:环境配置与多轮对话演示
macos
无限进步_5 小时前
【C++】寻找字符串中第一个只出现一次的字符
开发语言·c++·ide·windows·git·github·visual studio
June5615 小时前
SSH 免密 + 主机指纹登录完整安装步骤(macOS)
运维·macos·ssh
Just right7 小时前
pycharm卡死在Connected to pydev debugger
ide·python·pycharm
高斯的手稿08017 小时前
使用VNC从Windows/Mac复制文字,粘贴到树莓派终端里
macos
传说中胖子7 小时前
Magento服务器VSCode开启XDebug方法
服务器·vscode·php