Last active
April 11, 2016 07:27
-
-
Save Mumakil/4351d059dde6cfbcdc75e48419d3275a to your computer and use it in GitHub Desktop.
Fish functions
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
function be -d "Alias for `bundle exec`" | |
bundle exec $argv | |
end |
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
function bi -d "Alias for `bundle install`" | |
bundle install $argv | |
end |
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
# Path to Oh My Fish install. | |
set -gx OMF_PATH "/Users/otto/.local/share/omf" | |
# Customize Oh My Fish configuration path. | |
#set -gx OMF_CONFIG "/Users/otto/.config/omf" | |
# Load oh-my-fish configuration. | |
source $OMF_PATH/init.fish | |
# Fisher | |
set fisher_home ~/.local/share/fisherman | |
set fisher_config ~/.config/fisherman | |
source $fisher_home/config.fish | |
# Theme | |
set -g theme_nerd_fonts yes | |
set -g theme_display_vi yes | |
set -g theme_date_format "+%Y-%m-%d %H:%M" | |
set -g theme_display_vagrant yes | |
set -g theme_show_exit_status yes | |
# SSH-agent | |
set -g SSH_ENV ~/.ssh/environment | |
if test -f $SSH_ENV | |
bass . $SSH_ENV > /dev/null | |
#ps ${SSH_AGENT_PID} doesn't work under cywgin | |
if not eval (ps -ef | grep $SSH_AGENT_PID | grep ssh-agent\$ > /dev/null) | |
start_ssh_agent | |
end | |
else | |
start_ssh_agent | |
end | |
# Other | |
set -g LESS -R | |
set -g EDITOR vim |
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
# Requires `bass` to be installed | |
function nvm -d "Bass wrapper for nvm bash command" | |
bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv | |
end |
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
# Requires `bass` to be installed and $SSH_ENV to be set | |
function start_ssh_agent -d "Starts an ssh agent and saves the environment to $SSH_ENV for reuse" | |
echo "Initialising new SSH agent..." | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > $SSH_ENV | |
echo succeeded | |
chmod 600 "$SSH_ENV" | |
bass . "$SSH_ENV" > /dev/null | |
/usr/bin/ssh-add; | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment