Skip to content

Instantly share code, notes, and snippets.

@pablox-cl
Last active December 26, 2015 17:38
Show Gist options
  • Save pablox-cl/7187887 to your computer and use it in GitHub Desktop.
Save pablox-cl/7187887 to your computer and use it in GitHub Desktop.
Error log from composure.sh (draft function)
~ ❯❯❯ draft longest_line
+set-titles-preexec:1> zstyle -t :prezto:module:terminal auto-title
+set-titles-preexec:2> set-titles-with-command 'draft longest_line'
+set-titles-with-command:3> [[ '' == Apple_Terminal ]]
+set-titles-with-command:7> emulate -L zsh
+set-titles-with-command:8> setopt EXTENDED_GLOB
+set-titles-with-command:11> [[ draft == (fg|%*)(;|) ]]
+set-titles-with-command:26> local 'cmd=draft'
+set-titles-with-command:27> local 'truncated_cmd=draft'
+set-titles-with-command:28> unset MATCH
+set-titles-with-command:30> [[ xterm-256color == screen* ]]
+set-titles-with-command:33> set-terminal-window-title draft
+set-terminal-window-title:1> [[ xterm-256color == ((x|a|ml|dt|E)term*|(u|)rxvt*) ]]
+set-terminal-window-title:2> printf '\e]2;%s\a' draft
+set-titles-with-command:34> set-terminal-tab-title draft
+set-terminal-tab-title:1> [[ xterm-256color == ((x|a|ml|dt|E)term*|(u|)rxvt*) ]]
+set-terminal-tab-title:2> printf '\e]1;%s\a' draft
+_zsh_highlight_preexec_hook:2> _ZSH_HIGHLIGHT_PRIOR_BUFFER=''
+_zsh_highlight_preexec_hook:3> _ZSH_HIGHLIGHT_PRIOR_CURSOR=''
+zsh:6> draft longest_line
+draft:2> about 'wraps command from history into a new function, default is last command'
+about:0> :
+draft:3> param '1: name to give function'
+param:0> :
+draft:4> param '2: optional history line number'
+param:0> :
+draft:5> example '$ ls'
+example:0> :
+draft:6> example '$ draft list'
+example:0> :
+draft:7> example '$ draft newfunc 1120 # wraps command at history line 1120 in newfunc()'
+example:0> :
+draft:8> group composure
+group:0> :
+draft:10> typeset 'func=longest_line'
+draft:11> typeset 'num='
+draft:13> [ -z longest_line ']'
+draft:20> type -a -a longest_line
+draft:20> grep -i 'is.*alias'
+draft:20> [ -n '' ']'
+draft:25> typeset cmd
+draft:26> [ -z '' ']'
+draft:27> typeset 'lines=1'
+draft:29> fc -ln -1
+draft:29> grep -q draft
+draft:31> cmd=+draft:31> fc -ln -1
+draft:31> cmd=+draft:31> cmd=+draft:31> head -1
+draft:31> sed 's/^[[:blank:]]*//'
+draft:31> cmd='awk '' { if ( length > L ) { L=length} }END{ print L}'' ~/.zprezto/init.zsh'
+draft:36> _get_author_name
+_get_author_name:2> typeset name localname
+_get_author_name:3> localname=+_get_author_name:3> _get_composure_dir
+_get_composure_dir:2> [ -n '' ']'
+_get_composure_dir:5> echo /home/pablo/.local/composure
+_get_author_name:3> localname=+_get_author_name:3> hub --git-dir /home/pablo/.local/composure/.git config --get user.name
+_get_author_name:3> localname='Pablo Olmos de Aguilera Corradini'
+_get_author_name:4> name=
+_get_author_name:5> [ -n '' ']'
+_get_author_name:4> name=Pablo Olmos de Aguilera Corradini
+_get_author_name:5> [ -n 'Pablo Olmos de Aguilera Corradini' ']'
+_get_author_name:6> echo 'Pablo Olmos de Aguilera Corradini'
+_get_author_name:7> break
+draft:36> eval 'longest_line() {
author ''Pablo Olmos de Aguilera Corradini''
about ''''
param ''''
example ''''
group ''''
awk '' { if ( length > L ) { L=length} }END{ print L}'' ~/.zprezto/init.zsh;
}'
+draft:45> mktemp /tmp/draft.XXXX
+draft:45> typeset 'file=/tmp/draft.hCIH'
draft:46: file exists: /tmp/draft.hCIH
+draft:47> _transcribe longest_line /tmp/draft.hCIH Draft 'initial draft'
+_transcribe:2> typeset 'func=longest_line'
+_transcribe:3> typeset 'file=/tmp/draft.hCIH'
+_transcribe:4> typeset 'operation=Draft'
+_transcribe:5> typeset 'comment=initial draft'
+_transcribe:6> _get_composure_dir
+_get_composure_dir:2> [ -n '' ']'
+_get_composure_dir:5> echo /home/pablo/.local/composure
+_transcribe:6> typeset 'composure_dir=/home/pablo/.local/composure'
+_transcribe:8> git --version
+_transcribe:9> [ -d /home/pablo/.local/composure ']'
+_transcribe:10> _add_composure_file longest_line /tmp/draft.hCIH Draft 'initial draft'
+_add_composure_file:2> typeset 'func=longest_line'
+_add_composure_file:3> typeset 'file=/tmp/draft.hCIH'
+_add_composure_file:4> typeset 'operation=Draft'
+_add_composure_file:5> typeset 'comment=initial draft'
+_add_composure_file:6> _get_composure_dir
+_get_composure_dir:2> [ -n '' ']'
+_get_composure_dir:5> echo /home/pablo/.local/composure
+_add_composure_file:6> typeset 'composure_dir=/home/pablo/.local/composure'
+_add_composure_file:9> cd /home/pablo/.local/composure
+_add_composure_file:10> git rev-parse
+_add_composure_file:11> [ '!' -f /tmp/draft.hCIH ']'
+_add_composure_file:15> cp /tmp/draft.hCIH /home/pablo/.local/composure/longest_line.inc
+_add_composure_file:16> git add --all .
+_add_composure_file:17> [ -z 'initial draft' ']'
+_add_composure_file:21> git commit -m 'Draft longest_line: initial draft'
# On branch master
nothing to commit, working directory clean
+draft:48> rm /tmp/draft.hCIH
+draft:49> revise longest_line
+revise:2> about 'loads function into editor for revision'
+about:0> :
+revise:3> param '<optional> -e: revise version stored in ENV'
+param:0> :
+revise:4> param '1: name of function'
+param:0> :
+revise:5> example '$ revise myfunction'
+example:0> :
+revise:6> example '$ revise -e myfunction'
+example:0> :
+revise:7> example 'save a zero-length file to abort revision'
+example:0> :
+revise:8> group composure
+group:0> :
+revise:10> typeset 'source=git'
+revise:11> [ longest_line '=' -e ']'
+revise:16> typeset 'func=longest_line'
+revise:17> mktemp /tmp/revise.XXXX
+revise:17> typeset 'temp=/tmp/revise.HspX'
+revise:19> [ -z longest_line ']'
+revise:25> _get_composure_dir
+_get_composure_dir:2> [ -n '' ']'
+_get_composure_dir:5> echo /home/pablo/.local/composure
+revise:25> typeset 'composure_dir=/home/pablo/.local/composure'
+revise:27> [ git '=' env ']'
+revise:27> [ '!' -f /home/pablo/.local/composure/longest_line.inc ']'
+revise:32> cat /home/pablo/.local/composure/longest_line.inc
+revise:35> [ -z vim ']'
+revise:40> vim /tmp/revise.HspX
+revise:41> [ -s /tmp/revise.HspX ']'
+revise:62> printf '%s\n' 'zero-length file, revision aborted!'
zero-length file, revision aborted!
+revise:64> rm /tmp/revise.HspX
+set-titles-precmd:1> zstyle -t :prezto:module:terminal auto-title
+set-titles-precmd:2> set-titles-with-path
+set-titles-with-path:1> emulate -L zsh
+set-titles-with-path:2> setopt EXTENDED_GLOB
+set-titles-with-path:4> local 'absolute_path=/home/pablo'
+set-titles-with-path:6> [[ '' == Apple_Terminal ]]
+set-titles-with-path:9> local 'abbreviated_path=~'
+set-titles-with-path:10> local 'truncated_path=~'
+set-titles-with-path:11> unset MATCH
+set-titles-with-path:13> [[ xterm-256color == screen* ]]
+set-titles-with-path:16> set-terminal-window-title '~'
+set-terminal-window-title:1> [[ xterm-256color == ((x|a|ml|dt|E)term*|(u|)rxvt*) ]]
+set-terminal-window-title:2> printf '\e]2;%s\a' '~'
+set-titles-with-path:17> set-terminal-tab-title '~'
+set-terminal-tab-title:1> [[ xterm-256color == ((x|a|ml|dt|E)term*|(u|)rxvt*) ]]
+set-terminal-tab-title:2> printf '\e]1;%s\a' '~'
+prompt_sorin_precmd:1> setopt LOCAL_OPTIONS
+prompt_sorin_precmd:2> unsetopt XTRACE KSH_ARRAYS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment