Skip to content

Instantly share code, notes, and snippets.

@lxndrp
Created June 17, 2014 18:31
Show Gist options
  • Save lxndrp/e9030723f4bda12083fa to your computer and use it in GitHub Desktop.
Save lxndrp/e9030723f4bda12083fa to your computer and use it in GitHub Desktop.
> pmset -g batt
++ _lp_reset_runtime
++ _LP_RUNTIME_SECONDS=4
++ '[' 0 '!=' 1 ']'
++ _LP_RUNTIME_LAST_SECONDS=150
++ _LP_RUNTIME_SECONDS=0
++ '[' 'pmset -g batt' = _lp_set_prompt ']'
++ _LP_RUNTIME_COMMAND_EXECUTED=1
+ pmset -g batt
Now drawing from 'AC Power'
+++ _lp_reset_runtime
+++ _LP_RUNTIME_SECONDS=0
+++ '[' 1 '!=' 1 ']'
+++ '[' _lp_set_prompt = _lp_set_prompt ']'
+++ _LP_RUNTIME_COMMAND_EXECUTED=0
+++ return
++ _lp_set_prompt
++ local -i err=0
++ (( err != 0 ))
++ LP_ERR=
+++ echo -e ' \t'
++ local 'IFS=
'
++ eval ''
++++ _lp_jobcount_color
++++ [[ 1 != 1 ]]
+++++ jobs -r
+++++ wc -l
++++ local running=0
+++++ jobs -s
+++++ wc -l
++++ local stopped=0
+++++ screen -ls
+++++ grep -c '([Dd]etach[^)]*)$'
++++ local n_screen=0
+++++ tmux list-sessions
+++++ grep -cv attached
++++ local n_tmux=0
++++ local detached=0
++++ local m_detached=d
++++ local m_stop=z
++++ local 'm_run=&'
++++ local ret=
++++ [[ 0 != \0 ]]
++++ [[ 0 != \0 ]]
++++ [[ 0 != \0 ]]
++++ echo -ne ''
+++ _lp_sr ''
+++ [[ -n '' ]]
++ LP_JOBS=
++++ _lp_temperature
++++ [[ 0 != 1 ]]
++++ return
+++ _lp_sr ''
+++ [[ -n '' ]]
++ LP_TEMP=
++++ _lp_load_color
++++ [[ 1 != 1 ]]
+++++ _lp_cpu_load
+++++ local bol load eol
+++++ read bol load eol
++++++ LANG=C
++++++ sysctl -n vm.loadavg
+++++ echo 1.08
++++ local tmp=1.08
++++ tmp=108
++++ tmp=108
++++ tmp=108
++++ local -i load=108/4
++++ (( load > 60 ))
+++ _lp_sr ''
+++ [[ -n '' ]]
++ LP_LOAD=
++++ _lp_battery_color
++++ [[ 1 != 1 ]]
++++ local $'mark=?\214\201'
++++ local $'chargingmark=?\217\232'
++++ local bat
++++ local ret
+++++ _lp_battery
+++++ [[ 1 != 1 ]]
++++++ pmset -g batt
++++++ tail -n1
+++++ local 'pmset=Now drawing from '\''AC Power'\'''
++++++ cut -f2
+++++ local 'bat=Now drawing from '\''AC Power'\'''
+++++ bat='Now drawing from '\''AC Power'\'''
+++++ case "$pmset" in
+++++ [[ Now drawing from 'AC Power' -le 75 ]]
bash: [[: Now drawing from 'AC Power': syntax error: invalid arithmetic operator (error token is "'AC Power'")
+++++ echo -n 'Now drawing from '\''AC Power'\'''
+++++ return 3
++++ bat='Now drawing from '\''AC Power'\'''
++++ ret=3
++++ [[ 3 == 4 ]]
++++ [[ Now drawing from 'AC Power' == 100 ]]
++++ [[ 3 == 3 ]]
++++ [[ Now drawing from 'AC Power' != 100 ]]
++++ echo -ne '\[\]⏚\[\]'
++++ return
+++ _lp_sr '\[\]⏚\[\]'
+++ [[ -n \[\]⏚\[\] ]]
+++ echo -n '\[\]⏚\[\] '
++ LP_BATT='\[\]⏚\[\] '
++++ _lp_time
++++ [[ 0 != 1 ]]
++++ return
+++ _lp_sr ''
+++ [[ -n '' ]]
++ LP_TIME=
++ [[ 1, = 1,?* ]]
++ LP_PROXY=
++ [[ 1, = 1,?* ]]
++ LP_VENV=
++++ _lp_runtime
++++ [[ 1 != 1 ]]
++++ [[ 0 -ge 2 ]]
+++ _lp_sl ''
+++ [[ -n '' ]]
++ LP_RUNTIME=
++ [[ LP:/Users/alexp != \L\P\:\/\U\s\e\r\s\/\a\l\e\x\p ]]
++ [[ -n '' ]]
++ [[ -f '' ]]
++ [[ -z '' ]]
++ PS1='\n\[\e]0;\u@\h: \w\a\]\[\]⏚\[\] '
++ PS1='\n\[\e]0;\u@\h: \w\a\]\[\]⏚\[\] [\u\[\]\[\]:\[\]'
++ PS1='\n\[\e]0;\u@\h: \w\a\]\[\]⏚\[\] [\u\[\]\[\]:\[\]\[\]~\[\]]'
++ PS1='\n\[\e]0;\u@\h: \w\a\]\[\]⏚\[\] [\u\[\]\[\]:\[\]\[\]~\[\]]'
++ PS1='\n\[\e]0;\u@\h: \w\a\]\[\]⏚\[\] [\u\[\]\[\]:\[\]\[\]~\[\]] \[\]\$\[\] \n> '
+++ _lp_title '\n\[\e]0;\u@\h: \w\a\]\[\]⏚\[\] [\u\[\]\[\]:\[\]\[\]~\[\]] \[\]\$\[\] \n> '
+++ [[ 0 != \1 ]]
+++ return
++ LP_TITLE=
++ PS1='\n\[\e]0;\u@\h: \w\a\]\[\]⏚\[\] [\u\[\]\[\]:\[\]\[\]~\[\]] \[\]\$\[\] \n> '
⏚ [alexp:~] $
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment