Compare commits

..

3 Commits

Author SHA1 Message Date
inkch
afb560cd43 fish: for root, ignore fish configs except config.fish 2024-01-17 17:49:20 +09:00
inkch
60c33767a2 fish: for root, do not source env and abbrs 2024-01-17 17:44:13 +09:00
inkch
3dc55ac87b fish: empty alias.fish 2024-01-17 17:41:47 +09:00
3 changed files with 9 additions and 29 deletions

View File

@ -32,6 +32,11 @@ README.md
# for `root` user
.config/*
# fish-shell
!.config/fish
.config/fish/**/*
!.config/fish/config.fish
# starship
!.config/starship.toml

View File

@ -1,29 +0,0 @@
# alias bash "bash --init-file $XDG_CONFIG_HOME/bash/bashrc"
# alias vimpager "vimpager -c \"silent call <SNR>1_ToggleLess()\" "
# subversion
# alias svn 'svn --config-dir "$XDG_CONFIG_HOME"/subversion'
# cargo (rust)
# if type -q cargo
# alias ca 'cargo'
# end
# if type -q source-highlight
# alias ccat "source-highlight --out-format esc -o STDOUT -i"
# # alias pcat "source-highlight --out-format esc -o STDOUT"
# alias pcat "/usr/bin/source-highlight-esc.sh "
# end
# if type -q abcde && test -f $XDG_CONFIG_HOME/abcde.conf
# alias abcde "abcde -c ~/.config/abcde.conf"
# end
# if type -q newsboat
# alias news "pkill newsboat; timeout 10m newsboat; setsid $XDG_CONFIG_HOME/newsboat/ytdl.fish > /dev/null 2>&1"
# end
if type -q yarn
alias yarn "yarn --use-yarnrc '$XDG_CONFIG_HOME/yarn/config'"
end

View File

@ -1,10 +1,14 @@
set -x 0 fish
{{- if ne .chezmoi.username "root" -}}
source $HOME/.config/fish/env.fish
{{- end }}
# ONLY for interactive shell
if status --is-interactive
{{- if ne .chezmoi.username "root" -}}
source $HOME/.config/fish/abbreviations.fish
{{- end }}
set -q fish_private_mode && set -x FISH_IS_IN_PRIVATE 1
command -v zoxide > /dev/null && zoxide init fish | source
command -v starship > /dev/null && starship init fish | source