Replace zsh with yash
This commit is contained in:
parent
44f24053f0
commit
945bb9b83e
37
.profile
Executable file
37
.profile
Executable file
@ -0,0 +1,37 @@
|
||||
PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.ghcup/bin:$HOME/.cabal/bin:$PATH"
|
||||
|
||||
if [ -x /opt/homebrew/bin/brew ]
|
||||
then
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
|
||||
PATH="$HOMEBREW_PREFIX/opt/bison/bin:/usr/local/bin:$PATH"
|
||||
for tool in libtool coreutils grep gnu-sed findutils make
|
||||
do
|
||||
PATH="$HOMEBREW_PREFIX/opt/$tool/libexec/gnubin:$PATH"
|
||||
done
|
||||
else
|
||||
PATH="$HOME/Projects/lsp/flutter/bin:$PATH"
|
||||
export SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
|
||||
fi
|
||||
|
||||
if [ -d "$HOME/Android/Sdk" ]
|
||||
then
|
||||
export ANDROID_HOME="$HOME/Android/Sdk"
|
||||
elif [ -d "$HOME/Library/Android/sdk" ]
|
||||
then
|
||||
export ANDROID_HOME="$HOME/Library/Android/sdk"
|
||||
fi
|
||||
|
||||
if [ -n "$ANDROID_HOME" ]
|
||||
then
|
||||
# platform-tools may override system sqlite3.
|
||||
PATH="$PATH:$ANDROID_HOME/platform-tools"
|
||||
fi
|
||||
|
||||
export PATH
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
export LESS="-R"
|
||||
export EDITOR="nvim"
|
||||
|
||||
# vim: set ft=sh:
|
1
.yash_profile
Symbolic link
1
.yash_profile
Symbolic link
@ -0,0 +1 @@
|
||||
.profile
|
23
.yashrc
Executable file
23
.yashrc
Executable file
@ -0,0 +1,23 @@
|
||||
# Firstly, load the common customization script.
|
||||
. --autoload --no-alias initialization/common
|
||||
|
||||
# Undo some standard configuration.
|
||||
export YASH_PS1='${LOGNAME}@${HOSTNAME%%.*}[$(date +%k:%M)]: '\
|
||||
'${${${PWD:/~/\~}##*/}:-$PWD} ${{SHLVL-0}:/1}\$ '
|
||||
export YASH_PS1R='${{?:/0/}:+\\fr.$?\\fd. }'
|
||||
unset -f sh
|
||||
|
||||
# Clear the screen with Ctrl-L.
|
||||
bindkey --emacs '\^L' clear-and-redraw-all
|
||||
bindkey --vi-insert '\^L' clear-and-redraw-all
|
||||
bindkey --vi-command '\^L' clear-and-redraw-all
|
||||
|
||||
# Define shortcuts.
|
||||
alias rdpwin='xfreerdp /f /sound /v:192.168.0.4 /u:belka@caraus.de'
|
||||
|
||||
# Programming environment.
|
||||
command -v rbenv >/dev/null 2>&1 && eval "$(rbenv init -)"
|
||||
|
||||
command -v fastfetch >/dev/null 2>&1 && fastfetch
|
||||
|
||||
# vim: set ft=sh:
|
34
.zshenv
34
.zshenv
@ -1,34 +0,0 @@
|
||||
typeset -U path
|
||||
|
||||
path+=(
|
||||
$HOME/.local/bin
|
||||
$HOME/.cargo/bin
|
||||
$HOME/.ghcup/bin
|
||||
$HOME/.cabal/bin
|
||||
)
|
||||
|
||||
if [ -n "$HOMEBREW_PREFIX" ]
|
||||
then
|
||||
path=(
|
||||
$HOMEBREW_PREFIX/bin
|
||||
$HOMEBREW_PREFIX/opt/node@20/bin
|
||||
$HOMEBREW_PREFIX/opt/php@8.1/bin
|
||||
$HOMEBREW_PREFIX/opt/libtool/libexec/gnubin
|
||||
$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin
|
||||
$HOMEBREW_PREFIX/opt/grep/libexec/gnubin
|
||||
$HOMEBREW_PREFIX/opt/gnu-sed/libexec/gnubin
|
||||
$HOMEBREW_PREFIX/opt/findutils/libexec/gnubin
|
||||
$HOMEBREW_PREFIX/opt/make/libexec/gnubin
|
||||
$HOMEBREW_PREFIX/opt/bison/bin
|
||||
$path
|
||||
)
|
||||
else
|
||||
export SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
|
||||
fi
|
||||
|
||||
export PATH
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
export LESS="-R"
|
||||
export EDITOR="nvim"
|
||||
export JDTLS_HOME=$HOME/Projects/lsp/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository
|
65
.zshrc
65
.zshrc
@ -1,65 +0,0 @@
|
||||
# Auto completion.
|
||||
autoload -Uz compinit
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' completer _expand _complete _ignored
|
||||
zstyle :compinstall filename '$HOME/.zshrc'
|
||||
zmodload zsh/complist
|
||||
compinit
|
||||
_comp_options+=(globdots)
|
||||
|
||||
# Lines configured by zsh-newuser-install
|
||||
HISTFILE=~/.histfile
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
setopt autocd nomatch
|
||||
unsetopt beep extendedglob notify
|
||||
# End of lines configured by zsh-newuser-install
|
||||
|
||||
# Prompt left and right.
|
||||
PROMPT='%n@%m[%T]: %B%F{240}%1~%f%b %# '
|
||||
RPROMPT='%(?.%F{green}√.%F{red}?%?)%f'
|
||||
|
||||
bindkey -e # Emacs mode.
|
||||
# Key bindings.
|
||||
test -n "$terminfo[kdch1]" && bindkey "$terminfo[kdch1]" delete-char
|
||||
test -n "$terminfo[kpp]" && bindkey "$terminfo[kpp]" beginning-of-buffer-or-history
|
||||
test -n "$terminfo[knp]" && bindkey "$terminfo[knp]" end-of-buffer-or-history
|
||||
|
||||
test -n "$terminfo[khome]" && bindkey -M emacs "$terminfo[khome]" beginning-of-line
|
||||
test -n "$terminfo[kend]" && bindkey -M emacs "$terminfo[kend]" end-of-line
|
||||
|
||||
[[ "$terminfo[khome]" == "O"* ]] && bindkey -M emacs "${terminfo[khome]/O/[}" beginning-of-line
|
||||
[[ "$terminfo[kend]" == "O"* ]] && bindkey -M emacs "${terminfo[kend]/O/[}" end-of-line
|
||||
|
||||
test -n "$terminfo[kcbt]" && bindkey -M menuselect "$terminfo[kcbt]" reverse-menu-complete
|
||||
|
||||
# Load additional key bindings.
|
||||
eval "$(fzf --zsh 2> /dev/null)"
|
||||
|
||||
# Aliases.
|
||||
alias ls='ls --color' la='ls -a' ll='ls -l' lla='ll -a'
|
||||
alias mc='mc -xc'
|
||||
alias grep='grep --color=auto'
|
||||
|
||||
cp() if [ -t 0 ]; then command cp -i "$@"; else command cp "$@"; fi
|
||||
mv() if [ -t 0 ]; then command mv -i "$@"; else command mv "$@"; fi
|
||||
rm() if [ -t 0 ]; then command rm -i "$@"; else command rm "$@"; fi
|
||||
|
||||
# Keep working directory in a new instance for vte terminal emulators
|
||||
test -f /etc/profile.d/vte.sh && source /etc/profile.d/vte.sh
|
||||
|
||||
# Completion for kitty
|
||||
kitty + complete setup zsh | source /dev/stdin
|
||||
|
||||
. ~/.zshenv # Restore $PATH to my custom one
|
||||
|
||||
# Plugins
|
||||
if [ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]
|
||||
then
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
elif [ -n "$HOMEBREW_PREFIX" -a -f $HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]
|
||||
then
|
||||
source $HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
fi
|
||||
|
||||
whence -p fastfetch > /dev/null && fastfetch
|
Loading…
Reference in New Issue
Block a user