Add functions capability
Includes the wreck directory function
This commit is contained in:
7
functions/wreck.zsh
Normal file
7
functions/wreck.zsh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
function wreck() {
|
||||||
|
pushd .
|
||||||
|
|
||||||
|
WRECKDIR=`mktemp -d /tmp/wreckXXXXXXXXX` && {
|
||||||
|
cd $WRECKDIR
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -59,6 +59,8 @@ popd
|
|||||||
mkdir -p $INSTALL_DIR
|
mkdir -p $INSTALL_DIR
|
||||||
cp -rf packages $INSTALL_DIR/packages
|
cp -rf packages $INSTALL_DIR/packages
|
||||||
cp -f zshrc $INSTALL_DIR/zshrc
|
cp -f zshrc $INSTALL_DIR/zshrc
|
||||||
|
cp -rf functions $INSTALL_DIR/functions
|
||||||
|
cp -f env $INSTALL_DIR/.env
|
||||||
|
|
||||||
# Insert the INSTALL_DIR variable into the installed run control file
|
# Insert the INSTALL_DIR variable into the installed run control file
|
||||||
sed -i "" -e "1 i\\
|
sed -i "" -e "1 i\\
|
||||||
|
|||||||
13
zshrc
13
zshrc
@@ -1,6 +1,10 @@
|
|||||||
eval "$(rbenv init -)"
|
eval "$(rbenv init -)"
|
||||||
eval "$(nodenv init -)"
|
eval "$(nodenv init -)"
|
||||||
|
|
||||||
|
while IFS= read -r line; do
|
||||||
|
export $line
|
||||||
|
done <$INSTALL_DIR/.env
|
||||||
|
|
||||||
source $INSTALL_DIR/packages/geometry/geometry.zsh
|
source $INSTALL_DIR/packages/geometry/geometry.zsh
|
||||||
|
|
||||||
if type brew &>/dev/null; then
|
if type brew &>/dev/null; then
|
||||||
@@ -12,6 +16,10 @@ fi
|
|||||||
|
|
||||||
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
|
|
||||||
|
for file in $INSTALL_DIR/functions/*.zsh; do
|
||||||
|
source $file
|
||||||
|
done
|
||||||
|
|
||||||
typeset -U path cdpath fpath
|
typeset -U path cdpath fpath
|
||||||
setopt auto_cd
|
setopt auto_cd
|
||||||
cdpath=($HOME/src)
|
cdpath=($HOME/src)
|
||||||
@@ -19,4 +27,9 @@ cdpath=($HOME/src)
|
|||||||
zstyle ':completion:*' group-name ''
|
zstyle ':completion:*' group-name ''
|
||||||
zstyle ':completion:*:descriptions' format %d
|
zstyle ':completion:*:descriptions' format %d
|
||||||
|
|
||||||
|
export COMPLETION_WAITING_DOTS="true"
|
||||||
|
export TERM="xterm-256color"
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
|
export EDITOR="code -nw"
|
||||||
|
|
||||||
|
export PATH="/usr/local/sbin:$PATH"
|
||||||
|
|||||||
Reference in New Issue
Block a user