From 881e8c5303965bef3797e64843710a9c1030a3e9 Mon Sep 17 00:00:00 2001 From: Simonas Date: Sun, 17 Feb 2019 18:54:36 +0100 Subject: [PATCH] messy bsd --- .yadm/alt/.zshrc##FreeBSD | 135 ------------------------------------- .zsh.d/00-path.zsh | 2 +- .zsh.d/00-path.zsh#FreeBSD | 6 -- .zshrc##FreeBSD | 2 +- 4 files changed, 2 insertions(+), 143 deletions(-) delete mode 100644 .yadm/alt/.zshrc##FreeBSD delete mode 100644 .zsh.d/00-path.zsh#FreeBSD diff --git a/.yadm/alt/.zshrc##FreeBSD b/.yadm/alt/.zshrc##FreeBSD deleted file mode 100644 index bf41ed1..0000000 --- a/.yadm/alt/.zshrc##FreeBSD +++ /dev/null @@ -1,135 +0,0 @@ -### =============== Git prompt ================ ### -source "/home/snarbutas/.zsh-git-prompt/zshrc.sh" -ZSH_THEME_GIT_PROMPT_BRANCH="%{\x1b[3m%}%{$fg[cyan]%}" -ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}%{¤%G%}" -ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[blue]%}%{x%G%}" -ZSH_THEME_GIT_PROMPT_CHANGED="%{$fg[red]%}%{+%G%}" -ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[red]%}%{↓%G%}" -ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[blue]%}%{↑%G%}" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[red]%}%{…%G%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}%{✔%G%}" -### =============== Git prompt ================ ### - -## Enable completion -zstyle ':completion:*' completer _complete _ignored -zstyle ':completion:*' menu select -setopt completealiases -autoload -Uz compinit -compinit - -## Enable ANSI colors -autoload -U color - -## Set various options -setopt appendhistory nomatch notify -unsetopt autocd beep extendedglob -bindkey -e - -## History -setopt HIST_IGNORE_DUPS -HISTFILE=~/.histfile -HISTSIZE=100000 -SAVEHIST=100000 - -## Automatically fix terminal settings -ttyctl -f -stty -ixon -ixoff - -## Set a nice prompt -PROMPT='%F{red}[%F{blue}%*%F{red}]%f %F{yellow}bosman%f %F{magenta}[%f%B%F{magenta}%1~%f%b%F{magenta}]%f %(!.%F{red}.%F{green})≫ %f$(git_super_status) ' -RPROMPT=$'%F{cyan}%*%f' - -## Set a nice remote prompt -YELLOW="\[\033[38;5;3m\]" -BLUE="\[\033[38;5;4m\]" -ORANGE="\[\033[38;5;202m\]" -MAGENTA="\[\033[38;5;6m\]" -GREEN="\[\033[38;5;41m\]" -NOCOLOR="\[\033[0m\]" -BOL_FANCYPROMPT="${ORANGE}[${BLUE}\t${ORANGE}] ${YELLOW}\h ${MAGENTA}\W ${GREEN}≫${NOCOLOR} " -export BOL_FANCYPROMPT - -## Enable colors -LESS='-R' -LESSOPEN='|~/.lessfilter %s' - -## Setup editor and pager variables -PAGER="less" -EDITOR="vim" -VISUAL="${EDITOR}" -#TERM="xterm-termite" -export PAGER EDITOR VISUAL - -alias ls='ls --color=auto' - -## Add pastebin support -function Paste { curl -s -d "content='$(cat ${1})'&expire=6h" -o/dev/null -w "%{redirect_url}\n" http://go-paste.service.local:8080/; } - -# create a zkbd compatible hash; -# to add other keys to this hash, see: man 5 terminfo -typeset -A key - -key[Home]=${terminfo[khome]} -key[End]=${terminfo[kend]} -key[Insert]=${terminfo[kich1]} -key[Delete]=${terminfo[kdch1]} -key[Up]=${terminfo[kcuu1]} -key[Down]=${terminfo[kcud1]} -key[Left]=${terminfo[kcub1]} -key[Right]=${terminfo[kcuf1]} -key[PageUp]=${terminfo[kpp]} -key[PageDown]=${terminfo[knp]} - -# setup key accordingly -[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line -[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line -[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode -[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char -[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history -[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history -[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char -[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char -[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history -[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history - -if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then - function zle-line-init () { - printf '%s' "${terminfo[smkx]}" - } - function zle-line-finish () { - printf '%s' "${terminfo[rmkx]}" - } - zle -N zle-line-init - zle -N zle-line-finish -fi - -# ssh, scp, ping, host -zstyle ':completion:*:scp:*' tag-order \ - 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *' -zstyle ':completion:*:scp:*' group-order \ - users files all-files hosts-domain hosts-host hosts-ipaddr -zstyle ':completion:*:ssh:*' tag-order \ - users 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *' -zstyle ':completion:*:ssh:*' group-order \ - hosts-domain hosts-host users hosts-ipaddr - -zstyle ':completion:*:(ssh|scp):*:hosts-host' ignored-patterns \ - '*.*' loopback localhost -zstyle ':completion:*:(ssh|scp):*:hosts-domain' ignored-patterns \ - '<->.<->.<->.<->' '^*.*' '*@*' -zstyle ':completion:*:(ssh|scp):*:hosts-ipaddr' ignored-patterns \ - '^<->.<->.<->.<->' '127.0.0.<->' -zstyle ':completion:*:(ssh|scp):*:users' ignored-patterns \ - adm bin daemon halt lp named shutdown sync - -zstyle -e ':completion:*:(ssh|scp):*' hosts 'reply=( - ${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \ - /dev/null)"}%%[# ]*}//,/ } - ${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*} - ${=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}} - )' -bindkey "^[OA" history-beginning-search-backward -bindkey "^[OB" history-beginning-search-forward -for f in ~/.zsh.d/*.zsh; do - source "$f" -done diff --git a/.zsh.d/00-path.zsh b/.zsh.d/00-path.zsh index e014cc2..8f8ac9d 120000 --- a/.zsh.d/00-path.zsh +++ b/.zsh.d/00-path.zsh @@ -1 +1 @@ -/home/snarbutas/.yadm/alt/.zsh.d/00-path.zsh##Linux.epiphanius \ No newline at end of file +/root/.zsh.d/00-path.zsh##FreeBSD \ No newline at end of file diff --git a/.zsh.d/00-path.zsh#FreeBSD b/.zsh.d/00-path.zsh#FreeBSD deleted file mode 100644 index 85c31df..0000000 --- a/.zsh.d/00-path.zsh#FreeBSD +++ /dev/null @@ -1,6 +0,0 @@ -for dir in /usr/bin /usr/sbin /sbin /bin /Users/snarbutas/Desktop/sqlline-master/bin /Users/snarbutas/temp/platform-tools; do - if test -d "$dir" && ! grep -q -e "^${dir}:" -e ":${dir}:" -e ":${dir}" <<< $PATH; then - PATH="${dir}:${PATH}" - fi -done -export PATH diff --git a/.zshrc##FreeBSD b/.zshrc##FreeBSD index bf41ed1..ccd9324 100644 --- a/.zshrc##FreeBSD +++ b/.zshrc##FreeBSD @@ -1,5 +1,5 @@ ### =============== Git prompt ================ ### -source "/home/snarbutas/.zsh-git-prompt/zshrc.sh" +source "/root/.zsh-git-prompt/zshrc.sh" ZSH_THEME_GIT_PROMPT_BRANCH="%{\x1b[3m%}%{$fg[cyan]%}" ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%}%{¤%G%}" ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[blue]%}%{x%G%}"