Skip to content

Instantly share code, notes, and snippets.

@fbrnc
Last active July 2, 2016 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbrnc/a13b8232aeb996fc5d91 to your computer and use it in GitHub Desktop.
Save fbrnc/a13b8232aeb996fc5d91 to your computer and use it in GitHub Desktop.
Fish config (~/.config/fish/config.fish)
# Path to your oh-my-fish.
set fish_path $HOME/.oh-my-fish
# Path to your custom folder (default path is ~/.oh-my-fish/custom)
#set fish_custom $HOME/dotfiles/oh-my-fish
# Load oh-my-fish configuration.
. $fish_path/oh-my-fish.fish
function fish_user_key_bindings
bind \e\[1~ beginning-of-line
bind \e\[3~ delete-char
bind \e\[4~ end-of-line
end
funcsave fish_user_key_bindings
# Custom plugins and themes may be added to ~/.oh-my-fish/custom
# Plugins and themes can be found at https://github.com/oh-my-fish/
#Theme 'robbyrussell'
#Plugin 'theme'
alias cda='cd (realpath /var/www/a/devbox/releases/current/htdocs/..)'
alias cdas='cd /var/www/a/sai-web-magento-selenium'
alias na='/var/www/a/devbox/releases/current/tools/n98-magerun.phar --root-dir=/var/www/a/devbox/releases/current/htdocs'
alias cdp='cd (realpath /var/www/p/devbox/releases/current/htdocs/..)'
alias cdps='cd /var/www/p/devbox/selenium'
alias np='/var/www/p/devbox/releases/current/tools/n98-magerun.phar --root-dir=/var/www/p/devbox/releases/current/htdocs'
alias cd..='cd ..'
alias ll='ls -lah'
set -x SELENIUM_WINDOWPOSITION "-1280,360"
function prompt_pwd --description 'Print the current working directory, NOT shortened to fit the prompt'
if test "$PWD" != "$HOME"
printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|")
else
echo '~'
end
end
function fish_prompt --description 'Write out the prompt'
if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal)
end
switch $USER
case root
if not set -q __fish_prompt_cwd
if set -q fish_color_cwd_root
set -g __fish_prompt_cwd (set_color $fish_color_cwd_root)
else
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
end
end
echo -n -s "$USER" ' ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" '# '
case '*'
if not set -q __fish_prompt_cwd
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
end
echo -n -s "$USER" ' ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" '> '
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment