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
相关推荐
易我数据恢复大师5 小时前
mac如何运行windows程序?性能党vs便捷党选择指南
windows·macos·mac·mac运行windows程序·运行windows程序
xlntj5 小时前
VsCode远程连接服务器后安装Github Copilot无法使用
服务器·vscode·github
iCan_qi14 小时前
【Mac】【Minecraft】关于如何在Mac上搭建基岩版MC服务器的方法
运维·服务器·macos·minecraft
Black_Rock_br14 小时前
AI on Mac, Your Way!全本地化智能代理,隐私与性能兼得
人工智能·macos
TsengOnce14 小时前
Mac 4步 安装 Jenv 管理多版本JDK
macos·jenv
铁锚20 小时前
在MAC环境中安装unsloth
人工智能·python·macos·语言模型
Faith-小浩浩21 小时前
macos 多个版本的jdk
java·macos·jdk
2501_9280946521 小时前
OBS - Mac专业录屏工具(Mac中文)
macos·mac·录屏
大熊猫侯佩1 天前
拒绝羡慕 Cursor!Xcode 自己也能利用 AI 大模型让撸码如虎添翼【超详细配置】
macos·ai编程·xcode