From 234d5c0f7b384f11c31e9aef71c71f6199391c77 Mon Sep 17 00:00:00 2001 From: Lance Helsten Date: Tue, 7 Jul 2015 11:46:36 -0600 Subject: [PATCH] Settings and tab title. --- modules/prompt/functions/prompt_paradox_setup | 2 +- runcoms/zlogin | 6 ++--- runcoms/zshrc | 23 +++++++++++++++---- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/modules/prompt/functions/prompt_paradox_setup b/modules/prompt/functions/prompt_paradox_setup index 0845e082..a5407659 100644 --- a/modules/prompt/functions/prompt_paradox_setup +++ b/modules/prompt/functions/prompt_paradox_setup @@ -157,7 +157,7 @@ function prompt_paradox_setup { PROMPT=' ${(e)$(prompt_paradox_build_prompt)} ${editor_info[keymap]} ' - RPROMPT='%F{blue}[%F{green}%D{%H:%M:%S}%F{blue}]%f' + RPROMPT='%F{blue}[%F{green}%D{%Y-%m-%dT%H:%M:%S}%F{blue}]%f' SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' } diff --git a/runcoms/zlogin b/runcoms/zlogin index cea16803..9292753d 100644 --- a/runcoms/zlogin +++ b/runcoms/zlogin @@ -28,9 +28,9 @@ if (( $+commands[fortune] )); then fi fi -echo "Last logins:" -last -5 $USER -echo +#echo "Last logins:" +#last -5 $USER +#echo echo "$BASH $BASH_VERSION" date -u +"%a %e %b %Y %H:%M:%S GMT" diff --git a/runcoms/zshrc b/runcoms/zshrc index b3e7a468..bd78144b 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -21,7 +21,8 @@ else declare RPS1='%DT%*' fi -set -o vi +setopt histsubstpattern +setopt vi # General Settings declare -x CALENDAR_DIR="/usr/share/calendar" @@ -34,7 +35,7 @@ alias ls="ls -FGh" alias su="su -m" alias ping="ping -c 4" alias sed="sed -E" -alias grep="grep -nHEI --color --exclude-dir=\.git --exclude-dir=\.hg --exclude-dir=\.svn --exclude-dir=build --exclude-dir=dist --exclude=tags" +alias grep="grep -anHE --color --exclude-dir=\.git --exclude-dir=\.hg --exclude-dir=\.svn --exclude-dir=build --exclude-dir=dist --exclude=tags" if [ "$ZSH_VERSION" ]; then autoload -U compinit @@ -42,11 +43,25 @@ if [ "$ZSH_VERSION" ]; then # cd hook autoload -U add-zsh-hook + + title-bar() { + [[ -t 1 ]] || return + case $TERM in + sun-cmd) + print -Pn "\e]l%~\e\\" + ;; + *xterm*|rxvt|(dt|k|E)term) + print -Pn "\e]1;%~\a" + ;; + esac + } + add-zsh-hook precmd title-bar + load-local-conf() { # check file exists, is regular file and is readable: if [[ -f .sh_source && -r .sh_source ]]; then - source .sh_source - fi + source .sh_source + fi } add-zsh-hook chpwd load-local-conf fi