switched some stuff over to zulu
This commit is contained in:
parent
f46466ccb8
commit
b388a7855c
9 changed files with 24 additions and 422 deletions
|
@ -3,26 +3,3 @@ alias ..='cd ../'
|
|||
alias ...='cd ../../'
|
||||
alias ....='cd ../../../'
|
||||
alias .....='cd ../../../../'
|
||||
|
||||
# Go up [n] directories
|
||||
function up()
|
||||
{
|
||||
local cdir="$(pwd)"
|
||||
if [[ "${1}" == "" ]]; then
|
||||
cdir="$(dirname "${cdir}")"
|
||||
elif ! [[ "${1}" =~ ^[0-9]+$ ]]; then
|
||||
echo "Error: argument must be a number"
|
||||
elif ! [[ "${1}" -gt "0" ]]; then
|
||||
echo "Error: argument must be positive"
|
||||
else
|
||||
for i in {1..${1}}; do
|
||||
local ncdir="$(dirname "${cdir}")"
|
||||
if [[ "${cdir}" == "${ncdir}" ]]; then
|
||||
break
|
||||
else
|
||||
cdir="${ncdir}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
cd "${cdir}"
|
||||
}
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
#
|
||||
# Defines transfer alias and provides easy command line file and folder sharing.
|
||||
#
|
||||
# Authors:
|
||||
# Remco Verhoef <remco@dutchcoders.io>
|
||||
#
|
||||
|
||||
transfer() {
|
||||
# check arguments
|
||||
if [ $# -eq 0 ];
|
||||
then
|
||||
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# get temporarily filename, output is written to this file show progress can be showed
|
||||
tmpfile=$( mktemp -t transferXXX )
|
||||
|
||||
# upload stdin or file
|
||||
file=$1
|
||||
|
||||
if tty -s;
|
||||
then
|
||||
basefile=$(basename "$file" | sed -e 's/[^a-zA-Z0-9._-]/-/g')
|
||||
|
||||
if [ ! -e $file ];
|
||||
then
|
||||
echo "File $file doesn't exists."
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -d $file ];
|
||||
then
|
||||
# zip directory and transfer
|
||||
zipfile=$( mktemp -t transferXXX.zip )
|
||||
cd $(dirname $file) && zip -r -q - $(basename $file) >> $zipfile
|
||||
curl --progress-bar --upload-file "$zipfile" "https://transfer.sh/$basefile.zip" >> $tmpfile
|
||||
rm -f $zipfile
|
||||
else
|
||||
# transfer file
|
||||
curl --progress-bar --upload-file "$file" "https://transfer.sh/$basefile" >> $tmpfile
|
||||
fi
|
||||
else
|
||||
# transfer pipe
|
||||
curl --progress-bar --upload-file "-" "https://transfer.sh/$file" >> $tmpfile
|
||||
fi
|
||||
|
||||
# cat output link
|
||||
cat $tmpfile
|
||||
|
||||
# cleanup
|
||||
rm -f $tmpfile
|
||||
}
|
||||
|
24
zsh/zshrc
24
zsh/zshrc
|
@ -1,14 +1,20 @@
|
|||
# Exports & Completionpath
|
||||
export DOT=${HOME}/dotfiles OWN=${DOT}/zsh LIB=${DOT}/lib OMZ=${LIB}/ohmyzsh ZSH=${OMZ}
|
||||
export ZUL=${LIB}/zulu ZULU_DIR=${ZUL} ZUC=${ZUL}/config ZULU_CONFIG_DIR=${ZUC}
|
||||
export DOT=${HOME}/dotfiles
|
||||
export OWN=${DOT}/zsh
|
||||
export LIB=${DOT}/lib
|
||||
export OMZ=${LIB}/ohmyzsh
|
||||
export ZSH=${OMZ}
|
||||
export ZUL=${LIB}/zulu
|
||||
export ZULU_DIR=${ZUL}
|
||||
export ZUC=${ZUL}/config
|
||||
export ZULU_CONFIG_DIR=${ZUC}
|
||||
export PATH="${HOME}/dotfiles/bin:/opt/android-sdk/build-tools/26.0.0/:${PATH}"
|
||||
export EDITOR='nano'
|
||||
export TERM=linux
|
||||
fpath=(${LIB}/completions/src $fpath)
|
||||
|
||||
# Fix MobaXterm Home/End key with ZSH
|
||||
bindkey '^[[H' beginning-of-line
|
||||
bindkey '^[[F' end-of-line
|
||||
#bindkey '^[[H' beginning-of-line
|
||||
#bindkey '^[[F' end-of-line
|
||||
|
||||
# Settings & Dircolors
|
||||
ZSH_THEME="mortalscumbag"
|
||||
|
@ -17,7 +23,7 @@ ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
|
|||
eval `dircolors ${OWN}/dircolors`
|
||||
|
||||
# Plugins
|
||||
plugins=(git vagrant docker python ansible extract systemd systemadmin tmux command-not-found)
|
||||
plugins=(git vagrant docker python ansible systemd systemadmin tmux)
|
||||
case $(uname -n) in
|
||||
"megumi")
|
||||
plugins+=(archlinux)
|
||||
|
@ -37,11 +43,9 @@ if [[ ! -e ${ZUC}/ZULU_INSTALLED ]]; then
|
|||
fi
|
||||
|
||||
# Source the needed Parts
|
||||
#source ${ZUL}/core/zulu # Zulu
|
||||
source ${ZUL}/core/zulu # Zulu
|
||||
source ${OMZ}/oh-my-zsh.sh # Oh My ZSH
|
||||
source ${LIB}/highlighting/zsh-syntax-highlighting.zsh # Syntax Highlighting
|
||||
source ${HOME}/.fzf.zsh # FZF
|
||||
for file in ${OWN}/aliases.d/*.zsh; do source $file; done # Aliases
|
||||
|
||||
# Init Zulu
|
||||
#zulu init
|
||||
zulu init
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue