【发布时间】:2022-01-22 10:59:01
【问题描述】:
我正在尝试让 GitHub 代码空间识别我的点文件,以自动设置 zsh shell。
当我进入代码空间时,无论是在网络上还是从 VSCode 中,点文件都不起作用。也没有错误信息。
这就是我所做的
-
在 GitHub 上创建了一个公共 dotfiles 存储库,其中包含
.zshrc和setup.sh(内容如下)。直接通过 github.com 上的“添加文件”添加文件,然后复制/粘贴。 -
通过 github.com > settings > codespaces > use dotfiles = true (checkbox) 在 Codespaces 中启用自动运行点文件
-
VSCode > 设置 > linux 默认 shell > zsh
setup.sh
#!/bin/bash
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
cat .zshrc > $HOME/.zshrc
.zshrc
export ZSH="${HOME}/.oh-my-zsh"
ZSH_THEME="robbyrussell"
DISABLE_UNTRACKED_FILES_DIRTY="true"
plugins=(zsh-autosuggestions history-substring-search zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
PROMPT="*** zsh *** %~ "
【问题讨论】:
标签: github zsh dotfiles github-codespaces