Coder Social home page Coder Social logo

怎么卸载? about x-cmd HOT 3 CLOSED

x-cmd avatar x-cmd commented on May 26, 2024
怎么卸载?

from x-cmd.

Comments (3)

rentianyu avatar rentianyu commented on May 26, 2024 3

非常感谢您的回复,在您回复之前我已经删除了,和您说的操作是一样的。
可以关闭这个issue,谢谢!

from x-cmd.

edwinjhlee avatar edwinjhlee commented on May 26, 2024

删除原理

x-cmd 追求便携 以及 对系统的改动最小,所以只要删除 一个文件夹,以及 shell 启动时自动加载 x-cmd 那行代码即可:

  1. 删除 x-cmd 运行时文件夹 -- $HOME/.x-cmd.root
  2. 删除 启动时修改的 shell 引导文件相应的那行代码: '$HOME/.bashrc' 中有 '.x-cmd' 的代码行

(但如果不理解,可以跳过,直接按下面步骤走就可以)

对于使用 linux/mac 命令行的用户

上述过程非常自然,不过我们后面也会补充一份文档以及详细讨论可能的场景。

使用 windows的非 shell 用户

  1. 进入到 $HOME:打开我的电脑,找到 你的系统盘(假设是 C),进入到 `C:\用户<你的用户名>" 这个文件夹。
  2. 删掉里面的 .x-cmd.root 这个文件夹,这里面放着 x-cmd 的代码以及运行时可能下载的文件。
  3. 处理里面的 .bashrc 和 .zshrc 文件:
    1. 打开 $HOME/.bashrc
    2. 找到里面包含 x-cmd 的那些代码(一般只有一行)
    3. 删掉 2 所找到的那几行代码

使用 windows的 powershell 用户

如果上述过程采用 powershell

# 删掉 .x-cmd.root 文件夹
rm $HOME/.x-cmd.root

# 处理 bashrc 文件
  ### 手动处理:用 记事本 打开,然后按照上面陈述的,手动删除启动代码(就是 包含 `x-cmd` 的那几行代码)
notepad $HOME/.bashrc

  ### 自动处理,也可以试试:
(Get-Content -Path $HOME/.bashrc) | Where-Object { $_ -notmatch "x-cmd" } | Set-Content -Path $HOME/.bashrc


# 按照上述方法,同等处理 zshrc 文件,如果没有 .zshrc,就不用管了
   ### 手动处理,手动删除里面包含 x-cmd 的代码行
notepad $HOME/.zshrc 

   ### 自动处理,可以试试:
(Get-Content -Path $HOME/.zshrc) | Where-Object { $_ -notmatch "x-cmd" } | Set-Content -Path $HOME/.zshrc

我们后续工作:

  1. 出一份关于 x-cmd 卸载 方面的文档
  2. 关于 删除 x-cmd,在后续 x-cmd 版本中提供一种 方案。

from x-cmd.

edwinjhlee avatar edwinjhlee commented on May 26, 2024

我们现在在整个流程还不甚完善。如果上述流程有问题,欢迎在这里继续反馈讨论。

如果已正常完成操作,请告知,我们将会关闭这个 issue。

from x-cmd.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.