Misc: bash, rust, helix
- Fix: `.bashrc` not loaded when `.bash_login` doesn't exist - Fix: Rust install script error when `cc` doesn't exist - Style: use tabs - Helix: use tabs for bash, toml, & markdown - Helix: highlight rust scripts
This commit is contained in:
parent
38ec154801
commit
cac1b3176a
@ -39,10 +39,24 @@ EOF
|
|||||||
if [ -f ~/.bash_profile ]; then
|
if [ -f ~/.bash_profile ]; then
|
||||||
mv ~/.bash_profile ~/.bash_login
|
mv ~/.bash_profile ~/.bash_login
|
||||||
fi
|
fi
|
||||||
cat >> ~/.bash_login << 'EOF'
|
if [ -f ~/.bash_login ]; then
|
||||||
|
cat >> ~/.bash_login << 'EOF'
|
||||||
|
|
||||||
# custom
|
# custom
|
||||||
|
|
||||||
|
EOF
|
||||||
|
else
|
||||||
|
cat >> ~/.bash_login << 'EOF'
|
||||||
|
|
||||||
|
# custom
|
||||||
|
|
||||||
|
if [ -f ~/.bashrc ]; then
|
||||||
|
. ~/.bashrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
cat >> ~/.bash_login << 'EOF'
|
||||||
if [ -z "$TMUX" ] && [ -n "$SSH_TTY" ]; then
|
if [ -z "$TMUX" ] && [ -n "$SSH_TTY" ]; then
|
||||||
tput sc
|
tput sc
|
||||||
tput smso
|
tput smso
|
||||||
|
|||||||
@ -54,9 +54,9 @@ auto-pairs = false
|
|||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = 'rust'
|
name = 'rust'
|
||||||
indent.unit = "\t"
|
indent = { tab-width = 4, unit = "\t" }
|
||||||
indent.tab-width = 4
|
|
||||||
config.checkOnSave = { command = "clippy" }
|
config.checkOnSave = { command = "clippy" }
|
||||||
|
shebangs = ["rust-script"]
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "c"
|
name = "c"
|
||||||
@ -68,11 +68,19 @@ indent = { tab-width = 4, unit = "\t" }
|
|||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = 'java'
|
name = 'java'
|
||||||
indent.unit = "\t"
|
indent = { tab-width = 4, unit = "\t" }
|
||||||
indent.tab-width = 4
|
|
||||||
|
[[language]]
|
||||||
|
name = "bash"
|
||||||
|
indent = { tab-width = 4, unit = "\t" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "toml"
|
||||||
|
indent = { tab-width = 4, unit = "\t" }
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "markdown"
|
name = "markdown"
|
||||||
|
indent = { tab-width = 4, unit = "\t" }
|
||||||
language-server = { command = "ltex-ls" }
|
language-server = { command = "ltex-ls" }
|
||||||
file-types = ["md"]
|
file-types = ["md"]
|
||||||
scope = "source.markdown"
|
scope = "source.markdown"
|
||||||
|
|||||||
@ -10,6 +10,10 @@ if ! command -v curl > /dev/null; then
|
|||||||
echo "Error: curl not found"
|
echo "Error: curl not found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if ! command -v cc > /dev/null; then
|
||||||
|
echo "Error: cc not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if command -v cargo > /dev/null && [ "$force" != true ]; then
|
if command -v cargo > /dev/null && [ "$force" != true ]; then
|
||||||
echo "Error: rust already installed; use -f to force"
|
echo "Error: rust already installed; use -f to force"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user