forked from colonelpanic/dotfiles
Switch to powerline prompt.
This commit is contained in:
@@ -65,7 +65,7 @@ function set_bash_prompt() {
|
||||
╰─$(command_line_character) "
|
||||
}
|
||||
|
||||
export PROMPT_COMMAND=set_bash_prompt
|
||||
# export PROMPT_COMMAND=set_bash_prompt
|
||||
|
||||
PS2='(%_) '
|
||||
|
||||
@@ -74,3 +74,9 @@ case "$TERM" in
|
||||
export PS1='> '
|
||||
;;
|
||||
esac
|
||||
|
||||
function set_powerline_prompt {
|
||||
source "$(python_module_path powerline)/bindings/bash/powerline.sh"
|
||||
}
|
||||
|
||||
set_powerline_prompt
|
||||
|
@@ -89,7 +89,7 @@ function digga() {
|
||||
}
|
||||
|
||||
function shell_stats() {
|
||||
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
|
||||
history 0 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
|
||||
}
|
||||
|
||||
function is_ssh() {
|
||||
@@ -260,3 +260,7 @@ function track_modified {
|
||||
echo "Finding..."
|
||||
find $1 -newer $timestamp_file
|
||||
}
|
||||
|
||||
function python_module_path {
|
||||
python -c "import os, $1; print(os.path.dirname($1.__file__))"
|
||||
}
|
||||
|
@@ -132,7 +132,14 @@ prompt_tomorrow_colors
|
||||
# For reasons which are currently beyond me, it is not possible to use
|
||||
# $? in PROMPT which is why the second line is so strangely
|
||||
# constructed.
|
||||
export PROMPT='⚡ % $(print_with_color "%n" "$USERNAME_COLOR") $(separator "at") $(print_with_color "`hostname -s`" "$HOSTNAME_COLOR") $(separator "in") $(print_with_color "`current_directory`" "$CURRENT_DIRECTORY_COLOR")$(git_prompt_info)
|
||||
function set_my_prompt {
|
||||
export PROMPT='⚡ % $(print_with_color "%n" "$USERNAME_COLOR") $(separator "at") $(print_with_color "`hostname -s`" "$HOSTNAME_COLOR") $(separator "in") $(print_with_color "`current_directory`" "$CURRENT_DIRECTORY_COLOR")$(git_prompt_info)
|
||||
$(colored_job_count)%(?.$(print_with_color "$(command_line_character) ❯" $PROMPT_CHAR_SUCCESS).$(print_with_color "$(command_line_character) ❯" $PROMPT_CHAR_ERROR)) '
|
||||
export PS2='(%_) '
|
||||
}
|
||||
|
||||
PS2='(%_) '
|
||||
function set_powerline_prompt {
|
||||
source "$(python_module_path powerline)/bindings/zsh/powerline.zsh"
|
||||
}
|
||||
|
||||
set_powerline_prompt
|
||||
|
Reference in New Issue
Block a user