Cleanup: remove "functions" dir
This commit is contained in:
parent
bbd9165820
commit
f70f465a37
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/zsh
|
|
||||||
# for debugging: prefix any command with @ to print it before execution
|
|
||||||
function @() {
|
|
||||||
echo "$*"; "$@"
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
#!/bin/zsh
|
|
||||||
function bookmarks() {
|
|
||||||
typeset -A bookmarks
|
|
||||||
while read k v; do bookmarks[$k]="$v"; done < ~/.bookmarks
|
|
||||||
target=$(printf "%s\n" ${(k)bookmarks} | fzf)
|
|
||||||
cd ${~bookmarks[$target]}
|
|
||||||
}
|
|
||||||
|
|
||||||
function zle-bookmarks() {
|
|
||||||
bookmarks
|
|
||||||
zle reset-prompt
|
|
||||||
}
|
|
||||||
zle -N zle-bookmarks
|
|
|
@ -1,10 +0,0 @@
|
||||||
autoload -U zfinit && zfinit
|
|
||||||
zmodload zsh/zftp
|
|
||||||
|
|
||||||
imagepush() {
|
|
||||||
zfopen "crater2150.de" "ftp33701-crimages" \
|
|
||||||
"$(gpg -d $HOME/.passwords/imagepush)"
|
|
||||||
zfcd /
|
|
||||||
zfput $* && echo "Transfer succesful"
|
|
||||||
zfclose
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
lesswrap() {
|
|
||||||
cmd="$1"
|
|
||||||
alias $cmd="autoless command ${*}"
|
|
||||||
}
|
|
||||||
|
|
||||||
autoless() {
|
|
||||||
out=$("$@")
|
|
||||||
((lim=$LINES-1))
|
|
||||||
numlines=$(echo $out | wc -l)
|
|
||||||
if (( $numlines > $lim )); then
|
|
||||||
echo $out | less
|
|
||||||
else
|
|
||||||
echo $out
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
function parent-user() {
|
|
||||||
pid=${1:-$$}
|
|
||||||
uid=${2:-$(piduser $pid)}
|
|
||||||
stat=($(</proc/${pid}/stat))
|
|
||||||
ppid=${stat[4]}; echo $ppid
|
|
||||||
puid=$(piduser $ppid )
|
|
||||||
|
|
||||||
if [[ ${puid} != $uid ]]; then
|
|
||||||
echo ${puid}
|
|
||||||
elif [[ $ppid != 1 ]]; then
|
|
||||||
parent-user ${ppid}
|
|
||||||
fi
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
#################################################################################
|
|
||||||
# ZSH zle widget and custom function autloader
|
|
||||||
#################################################################################
|
|
||||||
#
|
|
||||||
# Lets you load custom functions and zle widgets split into single files.
|
|
||||||
#
|
|
||||||
# zle widgets are stored in the "widgets" folder in your configuration directory
|
|
||||||
# (set with $ZDOTDIR, see manpage). The widgets in /etc/zsh/widgets are also
|
|
||||||
# considered.
|
|
||||||
#
|
|
||||||
# functions are stored in the "functions" folder analogous.
|
|
||||||
#
|
|
||||||
|
|
||||||
if [[ -z $ZWIDGETPATH ]]; then
|
|
||||||
ZWIDGETPATH=( ${ZDOTDIR:+$ZDOTDIR/widgets} )
|
|
||||||
[[ -d /etc/zsh/widgets ]] && ZWIDGETPATH+=/etc/zsh/widgets
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z $ZFUNCTIONPATH ]]; then
|
|
||||||
ZFUNCTIONPATH=( ${ZDOTDIR:+$ZDOTDIR/functions} )
|
|
||||||
[[ -d /etc/zsh/functions ]] && ZFUNCTIONPATH+=/etc/zsh/functions
|
|
||||||
fi
|
|
||||||
|
|
||||||
fpath+=(${ZWIDGETPATH})
|
|
||||||
fpath+=(${ZFUNCTIONPATH})
|
|
||||||
|
|
||||||
for dir in $ZWIDGETPATH; do
|
|
||||||
if [ -d $dir ]; then
|
|
||||||
for i in $dir/*~*.zwc(N:t); do
|
|
||||||
autoload -Uz $i
|
|
||||||
zle -N $i
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
for dir in $ZFUNCTIONPATH; do
|
|
||||||
if [ -d $dir ]; then
|
|
||||||
for i in $dir/*~*.zwc(N:t); do
|
|
||||||
autoload -Uz $i
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
|
@ -7,7 +7,6 @@ zplug 'crater2150-zsh/fzf-widgets'
|
||||||
zplug 'crater2150-zsh/conf'
|
zplug 'crater2150-zsh/conf'
|
||||||
zplug 'crater2150-zsh/chroma-z', as:theme
|
zplug 'crater2150-zsh/chroma-z', as:theme
|
||||||
|
|
||||||
zplug $ZDOTDIR/plugins/autoloader, from:local
|
|
||||||
zplug $ZDOTDIR/plugins/highlight-config, from:local, defer:3
|
zplug $ZDOTDIR/plugins/highlight-config, from:local, defer:3
|
||||||
zplug $ZDOTDIR/plugins/bundled-compdefs, from:local
|
zplug $ZDOTDIR/plugins/bundled-compdefs, from:local
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue