Created
October 23, 2012 18:06
-
-
Save phred/3940401 to your computer and use it in GitHub Desktop.
phred's config.fish
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
if status --is-login | |
# Use universal variables to replace globals, this lets set -Ux change PATH and LANG forever | |
set -ge PATH | |
set -gx PATH $PATH | |
set -ge LANG | |
set -gx LANG $LANG | |
function e | |
emacsclient -n $argv | |
end | |
# open magit on the current directory | |
function g | |
e -ce '(magit-status ".")' '(delete-other-windows)' | |
end | |
function vi | |
e $argv | |
end | |
function start_title | |
printf '\033]0;' | |
end | |
function end_title | |
printf '\007' | |
end | |
function fish_prompt -d "Write out the prompt" | |
printf '%s%s@%s: %s%s' (start_title) (whoami) (hostname|cut -d . -f 1) (prompt_pwd) (end_title) | |
printf '%s@%s %s%s%s> ' (whoami) (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment