From ba5e037fa87fed9928e4a3567e4979fb6b39be4b Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Sun, 17 Feb 2019 18:05:46 +0100 Subject: [PATCH 1/9] add freebsd zshrc --- .yadm/alt/.zshrc##FreeBSD | 135 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 .yadm/alt/.zshrc##FreeBSD diff --git a/.yadm/alt/.zshrc##FreeBSD b/.yadm/alt/.zshrc##FreeBSD new file mode 100644 index 0000000..bf41ed1 --- /dev/null +++ b/.yadm/alt/.zshrc##FreeBSD @@ -0,0 +1,135 @@ +### =============== 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 From 1f8f3468cfcda84ec9995b071441ffe44bf48ba3 Mon Sep 17 00:00:00 2001 From: Simonas Date: Sun, 17 Feb 2019 18:28:58 +0100 Subject: [PATCH 2/9] add zsh for freebsd --- .zshrc##FreeBSD | 135 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 .zshrc##FreeBSD diff --git a/.zshrc##FreeBSD b/.zshrc##FreeBSD new file mode 100644 index 0000000..bf41ed1 --- /dev/null +++ b/.zshrc##FreeBSD @@ -0,0 +1,135 @@ +### =============== 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 From 7abcc525f01e09f3e1623d5c0210f42e5e11f39b Mon Sep 17 00:00:00 2001 From: Simonas Date: Sun, 17 Feb 2019 18:36:10 +0100 Subject: [PATCH 3/9] add path for freebsd --- .zsh.d/00-path.zsh#FreeBSD | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .zsh.d/00-path.zsh#FreeBSD diff --git a/.zsh.d/00-path.zsh#FreeBSD b/.zsh.d/00-path.zsh#FreeBSD new file mode 100644 index 0000000..85c31df --- /dev/null +++ b/.zsh.d/00-path.zsh#FreeBSD @@ -0,0 +1,6 @@ +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 From ff51a74baef6ba670359ffab6000639fd422fa6a Mon Sep 17 00:00:00 2001 From: Simonas Date: Sun, 17 Feb 2019 18:38:02 +0100 Subject: [PATCH 4/9] add path for freebsd --- .zsh.d/00-path.zsh##FreeBSD | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .zsh.d/00-path.zsh##FreeBSD diff --git a/.zsh.d/00-path.zsh##FreeBSD b/.zsh.d/00-path.zsh##FreeBSD new file mode 100644 index 0000000..85c31df --- /dev/null +++ b/.zsh.d/00-path.zsh##FreeBSD @@ -0,0 +1,6 @@ +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 From 40c483e4630925b576e34463bbac6617c0dc0ce9 Mon Sep 17 00:00:00 2001 From: Simonas Date: Sun, 17 Feb 2019 18:39:44 +0100 Subject: [PATCH 5/9] add path for freebsd --- .zsh.d/00-path.zsh##FreeBSD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zsh.d/00-path.zsh##FreeBSD b/.zsh.d/00-path.zsh##FreeBSD index 85c31df..9a3b037 100644 --- a/.zsh.d/00-path.zsh##FreeBSD +++ b/.zsh.d/00-path.zsh##FreeBSD @@ -1,4 +1,4 @@ -for dir in /usr/bin /usr/sbin /sbin /bin /Users/snarbutas/Desktop/sqlline-master/bin /Users/snarbutas/temp/platform-tools; do +for dir in /usr/bin /usr/sbin /sbin /bin ~/.bin; do if test -d "$dir" && ! grep -q -e "^${dir}:" -e ":${dir}:" -e ":${dir}" <<< $PATH; then PATH="${dir}:${PATH}" fi From 18201e8f753d997e3d1115a943bf4554ef85e9a3 Mon Sep 17 00:00:00 2001 From: simas Date: Sun, 17 Feb 2019 18:42:30 +0100 Subject: [PATCH 6/9] remove faulty file --- .yadm/alt/.zshrc##FreeBSD | 135 -------------------------------------- 1 file changed, 135 deletions(-) delete mode 100644 .yadm/alt/.zshrc##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 From 881e8c5303965bef3797e64843710a9c1030a3e9 Mon Sep 17 00:00:00 2001 From: Simonas Date: Sun, 17 Feb 2019 18:54:36 +0100 Subject: [PATCH 7/9] 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%}" From 4958c0a3a1e8e1932c50d2a5ba8909a77aa219cf Mon Sep 17 00:00:00 2001 From: simas Date: Sun, 17 Feb 2019 18:58:20 +0100 Subject: [PATCH 8/9] bsd mess pt2 --- .zsh.d/00-path.zsh | 2 +- .zsh.d/00-path.zsh#FreeBSD | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 .zsh.d/00-path.zsh#FreeBSD diff --git a/.zsh.d/00-path.zsh b/.zsh.d/00-path.zsh index e014cc2..9deac97 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 +/home/simas/.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 From 04ced1c3d0f53bf35f4f5fe8e3b660c4a99985f3 Mon Sep 17 00:00:00 2001 From: simas Date: Sun, 17 Feb 2019 19:35:27 +0100 Subject: [PATCH 9/9] not sure no more --- .zsh.d/00-path.zsh | 7 +- .zsh.d/00-path.zsh##FreeBSD | 6 -- .zshrc##FreeBSD | 135 ------------------------------------ 3 files changed, 6 insertions(+), 142 deletions(-) mode change 120000 => 100644 .zsh.d/00-path.zsh delete mode 100644 .zsh.d/00-path.zsh##FreeBSD delete mode 100644 .zshrc##FreeBSD diff --git a/.zsh.d/00-path.zsh b/.zsh.d/00-path.zsh deleted file mode 120000 index 9deac97..0000000 --- a/.zsh.d/00-path.zsh +++ /dev/null @@ -1 +0,0 @@ -/home/simas/.zsh.d/00-path.zsh##FreeBSD \ No newline at end of file diff --git a/.zsh.d/00-path.zsh b/.zsh.d/00-path.zsh new file mode 100644 index 0000000..9a3b037 --- /dev/null +++ b/.zsh.d/00-path.zsh @@ -0,0 +1,6 @@ +for dir in /usr/bin /usr/sbin /sbin /bin ~/.bin; 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/.zsh.d/00-path.zsh##FreeBSD b/.zsh.d/00-path.zsh##FreeBSD deleted file mode 100644 index 9a3b037..0000000 --- a/.zsh.d/00-path.zsh##FreeBSD +++ /dev/null @@ -1,6 +0,0 @@ -for dir in /usr/bin /usr/sbin /sbin /bin ~/.bin; 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 deleted file mode 100644 index ccd9324..0000000 --- a/.zshrc##FreeBSD +++ /dev/null @@ -1,135 +0,0 @@ -### =============== Git prompt ================ ### -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%}" -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