From dddb87b02c9d73185fc5c1318a9a9fadd3d97cfc Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Tue, 16 Jan 2018 17:29:31 +0000 Subject: [PATCH] Add aliases anf modify prompt --- config/oh-my-zsh/aliases.zsh | 21 +++++++++++++++++++++ config/oh-my-zsh/promptconfig.zsh | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/config/oh-my-zsh/aliases.zsh b/config/oh-my-zsh/aliases.zsh index 8e1d3803..ba2dd850 100644 --- a/config/oh-my-zsh/aliases.zsh +++ b/config/oh-my-zsh/aliases.zsh @@ -128,7 +128,28 @@ alias aa2mp3='ffmpeg -f concat -safe 0 -i <(for f in *.aa; do echo "file '"'"'$( alias cim="vim" alias vom="vim" alias vin="vim" +alias vi="vim" #Servers Memory alias servermem='toilet -w 200 "VPS 01" && ssh shires free -h && toilet -w 200 "VPS 02" && ssh abc free -h && toilet -w 200 "VPS 03" && ssh cdc2 free -h && toilet -w 200 "Freightliner" && ssh freightliner free && toilet -w 200 "NHS" && ssh nhs free -h' +########################################### +# # +# Suffex Aliases # +# # +########################################### + +alias -s html=$EDITOR +alias -s htm=$EDITOR + +alias -s php=$EDITOR + +alias -s less=$EDITOR +alias -s css=$EDITOR + +alias -s js=$EDITOR +alias -s es6=$EDITOR + +alias -s gitignore=$EDITOR + +alias -s json=$EDITOR diff --git a/config/oh-my-zsh/promptconfig.zsh b/config/oh-my-zsh/promptconfig.zsh index c395124f..de4e7b68 100644 --- a/config/oh-my-zsh/promptconfig.zsh +++ b/config/oh-my-zsh/promptconfig.zsh @@ -33,6 +33,10 @@ function my_dir(){ # Change wp-content in sub folders current_path=$(echo $current_path | sed -r -e "s/wp\-content\//wpc\//") + + if [[ $(tput cols) -lt 100 ]]; then + current_path=$(echo $current_path | sed -r -e "s/wpc\/themes\///") + fi elif [[ -e "$ph/bin/magento" ]]; then #If magento icon=$magentoSiteIcon