Last active
July 24, 2020 00:09
-
-
Save ryanpcmcquen/2f93191657c621a7425787db938d2f8e to your computer and use it in GitHub Desktop.
The McQuen fish prompt.
This file contains hidden or 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
test -e {$HOME}/.iterm2_shell_integration.fish ; and source {$HOME}/.iterm2_shell_integration.fish | |
set -gx NODE_EXTRA_CA_CERTS '/usr/local/etc/openssl/cert.pem' | |
set -U EDITOR subl -w | |
set -U VISUAL subl -w | |
source "$HOME/.config/fish/secrets.fish" | |
set -gx ENGAGE_IMGATCH_SERVICE false | |
set -gx LDFLAGS "-L/usr/local/opt/node@12/lib" | |
set -gx CPPFLAGS "-I/usr/local/opt/node@12/include" | |
set -g fish_user_paths "$HOME/.sdkman/candidates/gradle/current/bin" $fish_user_paths | |
set -g fish_user_paths "/usr/local/opt/node@12/bin" $fish_user_paths | |
set -g fish_user_paths "/usr/local/opt/[email protected]/bin" $fish_user_paths | |
set -g fish_user_paths "/usr/local/opt/[email protected]/sbin" $fish_user_paths | |
set -g fish_user_paths "/usr/local/opt/tomcat@8/bin" $fish_user_paths | |
set -g fish_user_paths "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin" $fish_user_paths | |
set -gx JAVA_HOME "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home" | |
set -gx ANDROID_SDK_ROOT "$HOME/Library/Android/sdk" | |
set -g fish_user_paths "$HOME/Library/Android/sdk/platform-tools" $fish_user_paths | |
set -g fish_user_paths "$HOME/Library/Android/sdk/cmdline-tools/latest/bin" $fish_user_paths | |
set -gx ANDROID_HOME "$HOME/Library/Android/sdk" | |
set -gx PATH "$PATH:$ANDROID_HOME/emulator" | |
set -gx PATH "$PATH:$ANDROID_HOME/tools" | |
set -gx PATH "$PATH:$ANDROID_HOME/tools/bin" | |
set -gx PATH "$PATH:$ANDROID_HOME/platform-tools" |
This file contains hidden or 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
function __mcquen_decorate | |
echo -n " 🌳 " | |
if [ (count $argv) -gt 1 ] | |
set_color $argv[2..(count $argv)] | |
end | |
echo -n $argv[1] | |
set_color $fish_color_normal | |
end | |
function __mcquen_prompt_date | |
__mcquen_decorate (date +%H:%M:%S) "cc0" | |
end | |
function __mcquen_prompt_git | |
set -g __fish_git_prompt_show_informative_status 1 | |
set -g __fish_git_prompt_showcolorhints 1 | |
set -g __fish_git_prompt_char_dirtystate "*" | |
set -g __fish_git_prompt_char_invalidstate "#" | |
set -g __fish_git_prompt_char_stagedstate "+" | |
set -g __fish_git_prompt_char_stateseparator " " | |
set -l prompt (__fish_git_prompt "%s") | |
if [ -n "$prompt" ] | |
__mcquen_decorate $prompt | |
echo -n " " | |
end | |
end | |
function __mcquen_prompt_cwd | |
__mcquen_decorate (prompt_pwd) yellow | |
echo -n " " | |
end | |
function __mcquen_prompt_fish | |
__mcquen_decorate ' 🐠 🐈' blue | |
echo | |
end | |
function fish_prompt | |
set -g fish_prompt_pwd_dir_length 0 | |
__mcquen_prompt_cwd | |
__mcquen_prompt_fish | |
__mcquen_prompt_git | |
__mcquen_prompt_date | |
echo | |
echo "λ " | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment