-
-
Save zachriggle/eedbfebee870bf66bfafcc2f78b2da78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
local -a _to_source=( ${@[1,-1]} ) | |
local _blacklisted_paths="${(j:|:)fpath}|${0:A}" | |
TRAPDEBUG() { | |
local trace=$funcfiletrace[1] | |
local file=${trace%%:*} | |
file=${file:A} | |
if [[ "$file" =~ "$_blacklisted_paths" ]]; then | |
return | |
fi | |
local first_line=$(head -1 <<<$ZSH_DEBUG_CMD) | |
# local first_line=${ZSH_DEBUG_CMD:%%\n} | |
command echo $'\n$' "$first_line" | |
} | |
() { | |
source "${_to_source[@]}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment