[zsh] Remove all the ShellLog calls -- just too slow :(
This commit is contained in:
parent
a13ecc9e4d
commit
1c80ab1de4
16 changed files with 0 additions and 38 deletions
3
zprofile
3
zprofile
|
@ -1,11 +1,8 @@
|
|||
#!/usr/bin/env zsh
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
ShellLog 'Initializing Login Environment'
|
||||
|
||||
# Start SSH agent for password-less logins
|
||||
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
|
||||
ShellLog 'Starting ssh-agent'
|
||||
eval `ssh-agent -s`
|
||||
trap "kill $SSH_AGENT_PID" 0
|
||||
fi
|
||||
|
|
|
@ -7,14 +7,12 @@ function darwin_configure_screenshots_directory
|
|||
{
|
||||
icloud=`darwin_icloud_drive_path`
|
||||
if [[ ! -d "$icloud" ]]; then
|
||||
ShellLog -l error "iCloud directory doesn't exist: $icloud"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Put screenshots in iCloud Drive, in a directory according to hostname
|
||||
local name=`hostname -s | tr A-Z a-z`
|
||||
local screenshots_dir="$icloud/Screenshots/$name"
|
||||
ShellLog "Setting screenshot directory: $screenshots_dir"
|
||||
mkdir -p "$screenshots_dir"
|
||||
defaults write com.apple.screencapture screenshots_diration "$screenshots_dir"
|
||||
|
||||
|
|
|
@ -7,14 +7,12 @@ autoload darwin_configure_screenshots_directory
|
|||
function darwin_init_once
|
||||
{
|
||||
# Dim dock icons of apps that have been hidden.
|
||||
ShellLog "Auto-hiding Dock"
|
||||
defaults write com.apple.Dock showhidden -boolean yes
|
||||
killall Dock
|
||||
|
||||
darwin_configure_screenshots_directory
|
||||
|
||||
# See https://techstuffer.com/this-app-is-damaged-error-macos-sierra/
|
||||
ShellLog "Disabling overly restrictive Gatekeeper"
|
||||
sudo spctl --master-disable
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
function init_env
|
||||
{
|
||||
ShellLog 'Initializing basic environment'
|
||||
|
||||
export PAGER="less"
|
||||
export MANPAGER=$PAGER
|
||||
export EDITOR="vim"
|
||||
|
|
|
@ -7,8 +7,6 @@ autoload prepend_to_path
|
|||
|
||||
function init_env_darwin
|
||||
{
|
||||
ShellLog "Initializing Darwin environment"
|
||||
|
||||
export OSBUILD=`sysctl -n kern.osversion`
|
||||
export OSVERSION=`sysctl -n kern.osproductversion`
|
||||
export HWMODEL=`sysctl -n hw.model`
|
||||
|
|
|
@ -5,8 +5,6 @@ autoload binary_exists
|
|||
|
||||
function init_rc_aliases
|
||||
{
|
||||
ShellLog -l 'debug' "Setting up shell aliases"
|
||||
|
||||
alias j='jobs'
|
||||
alias h='history'
|
||||
alias df='df -h'
|
||||
|
@ -28,13 +26,11 @@ function init_rc_aliases
|
|||
binary_exists ledger && alias l='ledger'
|
||||
binary_exists gpg2 && alias gpg='gpg2'
|
||||
|
||||
ShellLog -l debug 'Setting up suffix aliases'
|
||||
alias -s c='vim'
|
||||
alias -s tex='vim'
|
||||
alias -s txt='vim'
|
||||
alias -s xml='vim'
|
||||
alias -s jar='java -jar'
|
||||
|
||||
}
|
||||
|
||||
init_rc_aliases "$@"
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
function init_rc_configure_completion
|
||||
{
|
||||
ShellLog 'Initializing completion system'
|
||||
|
||||
autoload -U compinit
|
||||
compinit
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ function init_configure_ls
|
|||
local ls_options
|
||||
|
||||
if [[ ! -e "$1" ]]; then
|
||||
ShellLog -l error 'Missing required path to ls binary'
|
||||
return
|
||||
fi
|
||||
|
||||
|
@ -19,7 +18,6 @@ function init_configure_ls
|
|||
ls_options='-G'
|
||||
fi
|
||||
|
||||
ShellLog -l debug "Setting up aliases for $1"
|
||||
alias ls="$1 $ls_options"
|
||||
alias la="$1 -A $ls_options"
|
||||
alias ll="$1 -l $ls_options"
|
||||
|
@ -33,7 +31,6 @@ function init_configure_ls
|
|||
dircolors="$HOME/.dircolors/default.cfg"
|
||||
fi
|
||||
|
||||
ShellLog -l debug "Setting up dircolors: `basename $dircolors`"
|
||||
eval `$dircolors_bin $dircolors`
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -8,8 +8,6 @@ function init_rc_configure_prompt
|
|||
theme=loquacious
|
||||
fi
|
||||
|
||||
ShellLog -l debug 'Configuring vcs_info'
|
||||
|
||||
autoload -U add-zsh-hook
|
||||
autoload -Uz vcs_info
|
||||
|
||||
|
@ -28,7 +26,6 @@ function init_rc_configure_prompt
|
|||
|
||||
add-zsh-hook precmd export_gitbranch
|
||||
|
||||
ShellLog "Configuring prompt with '$theme' theme"
|
||||
autoload -U promptinit
|
||||
promptinit
|
||||
prompt $theme
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
function init_rc_configure_zle
|
||||
{
|
||||
ShellLog 'Configuring ZLE'
|
||||
|
||||
local mode=$1
|
||||
if [[ -z "$mode" ]]; then
|
||||
mode=emacs
|
||||
|
@ -13,7 +11,6 @@ function init_rc_configure_zle
|
|||
function configure_zle_emacs { }
|
||||
function configure_zle_vim { }
|
||||
|
||||
ShellLog -l debug "Using $mode command line editing mode"
|
||||
if [[ $mode == 'vim' ]]; then
|
||||
bindkey -v
|
||||
configure_zle_vim
|
||||
|
|
|
@ -5,8 +5,6 @@ autoload binary_exists
|
|||
|
||||
function init_rc_darwin
|
||||
{
|
||||
ShellLog 'Initializing Interactive Environment for macOS'
|
||||
|
||||
alias acls='command ls -le'
|
||||
|
||||
# These things might have been installed by Homebrew, and I like the GNU
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
function init_rc_linux
|
||||
{
|
||||
ShellLog 'Initializing Interactive Environment for Linux'
|
||||
|
||||
alias iptls='sudo iptables --line-numbers -nv -L'
|
||||
alias ip6tls='sudo ip6tables --line-numbers -nv -L'
|
||||
alias rlx="xrdb $HOME/.Xdefaults"
|
||||
|
|
|
@ -7,7 +7,6 @@ function init_zsh_functions
|
|||
{
|
||||
local myfpath="$HOME/.zsh/func"
|
||||
|
||||
ShellLog "Loading functions in $myfpath"
|
||||
for func in $myfpath/*; do
|
||||
[[ ! -e "$func" || -d "$func" ]] && continue
|
||||
|
||||
|
@ -15,7 +14,6 @@ function init_zsh_functions
|
|||
[[ "$functionName" =~ "prompt_*" ]] && continue
|
||||
[[ "$functionName" =~ "init_*" ]] && continue
|
||||
|
||||
ShellLog -l debug "Loading $functionName"
|
||||
autoload +X $functionName
|
||||
done
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
function init_zsh_history
|
||||
{
|
||||
ShellLog 'Setting up history'
|
||||
|
||||
setopt \
|
||||
APPEND_HISTORY \
|
||||
EXTENDED_HISTORY \
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
function init_zsh_options
|
||||
{
|
||||
ShellLog 'Setting shell options'
|
||||
|
||||
# Report seconds since shell was invoked in milliseconds
|
||||
typeset -F SECONDS
|
||||
|
||||
|
|
2
zshrc
2
zshrc
|
@ -1,8 +1,6 @@
|
|||
#!/usr/bin/env zsh
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
ShellLog 'Initializing Interactive Environment'
|
||||
|
||||
autoload +X init_app_environments
|
||||
autoload +X init_rc_aliases
|
||||
autoload +X init_rc_configure_completion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue