mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-12-24 15:57:43 +00:00
Clean fish stuff
This commit is contained in:
parent
3f7b620f94
commit
89b681e42d
@ -1,3 +0,0 @@
|
||||
|
||||
fishtape
|
||||
bass
|
1
assets/default/oh-my-fish/.gitignore
vendored
1
assets/default/oh-my-fish/.gitignore
vendored
@ -1 +0,0 @@
|
||||
*.local.fish
|
@ -1,37 +0,0 @@
|
||||
# vim
|
||||
alias nv='nvim'
|
||||
alias tv='tmux-vim'
|
||||
alias :q='exit'
|
||||
|
||||
# git
|
||||
alias ga='git add'
|
||||
alias gc='git commit'
|
||||
alias gco='git checkout'
|
||||
alias gd='git diff'
|
||||
alias gl='git log'
|
||||
alias gr='git rebase'
|
||||
alias gs='git status'
|
||||
alias tiga='tig --all'
|
||||
|
||||
# cd
|
||||
alias cd..='cd ..'
|
||||
|
||||
# vim
|
||||
alias mviml='env VIM_COLOR=github mvim'
|
||||
|
||||
# terminal-notifier
|
||||
alias notify-done='terminal-notifier -message "Done"'
|
||||
alias notify-success='terminal-notifier -message "Success"'
|
||||
alias notify-fail='terminal-notifier -message "Failure"'
|
||||
|
||||
function sh-notify
|
||||
[ $status = 0 ] ;and notify-success ;or notify-fail
|
||||
end
|
||||
|
||||
# gopush
|
||||
alias pb-done='pb "Done"'
|
||||
alias pb-success='pb "Success"'
|
||||
alias pb-failure='pb "Failure"'
|
||||
function pb-notify
|
||||
[ $status = 0 ] ;and pb-success ;or pb-failure
|
||||
end
|
@ -1,11 +0,0 @@
|
||||
# package bak
|
||||
# package balias
|
||||
package export
|
||||
package extract
|
||||
package force
|
||||
package jump
|
||||
package notify-funcs
|
||||
package osx
|
||||
package pbcopy
|
||||
package port
|
||||
theme thefij
|
@ -1,14 +0,0 @@
|
||||
function source_config
|
||||
# Sources a config file and corresponding local config file if it exists
|
||||
set shared_config "$OMF_CONFIG/$argv[1].fish"
|
||||
set local_config "$OMF_CONFIG/$argv[1].local.fish"
|
||||
if test -f "$shared_config"
|
||||
source "$shared_config"
|
||||
end
|
||||
if test -f "$local_config"
|
||||
source "$local_config"
|
||||
end
|
||||
end
|
||||
|
||||
source_config paths
|
||||
source_config alias
|
@ -1,55 +0,0 @@
|
||||
set det_os "unknown"
|
||||
|
||||
switch (uname)
|
||||
case "Darwin"
|
||||
set det_os "mac"
|
||||
case "Linux"
|
||||
set det_os "linux"
|
||||
case '*'
|
||||
set det_os "unknown"
|
||||
end
|
||||
|
||||
# opt directory
|
||||
if [ -d /opt/local ]
|
||||
set -gx PATH /opt/local/bin /opt/local/sbin $PATH
|
||||
end
|
||||
|
||||
# Google GO
|
||||
set -gx GOROOT /usr/local/go
|
||||
if [ -d "$GOROOT" ]
|
||||
set -gx PATH $PATH $GOROOT/bin
|
||||
end
|
||||
|
||||
if [ $det_os = "linux" ]
|
||||
set android_sdk $HOME/workspace/adt-bundle-linux/sdk
|
||||
else if [ $det_os = "mac" ]
|
||||
set android_sdk $HOME/workspace/android-sdk-macosx
|
||||
|
||||
set go_workspace $HOME/workspace/go_workspace
|
||||
if [ -d "$go_workspace" ]
|
||||
set -gx GOPATH $go_workspace
|
||||
set -gx PATH $PATH $GOPATH/bin
|
||||
end
|
||||
|
||||
# set PATH $HOME/Library/Python/2.7/bin $PATH
|
||||
# Fix Python path on OSX to avoid considering System extras over newer versions
|
||||
set -gx PYTHONPATH /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages /Library/Python/2.7/site-packages $PYTHONPATH
|
||||
end
|
||||
|
||||
# Google cloud sdk
|
||||
# set sdk_dir "$HOME/workspace/google-cloud-sdk"
|
||||
# set bin_path "$sdk_dir/bin"
|
||||
# set -gx PATH $bin_path $PATH
|
||||
# set -gx PYTHONPATH "$sdk_dir/platform/google_appengine" $PYTHONPATH
|
||||
|
||||
# Android paths
|
||||
set -gx ANDROID_HOME $android_sdk
|
||||
set -gx PATH $PATH $android_sdk/platform-tools $android_sdk/tools
|
||||
|
||||
# Home path
|
||||
set -gx PATH $HOME/bin $PATH
|
||||
|
||||
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
|
||||
|
||||
# Increase memory sizes for java using Ant
|
||||
set -gx ANT_OPTS "-Xmx2048m -Xms512m"
|
@ -1,3 +0,0 @@
|
||||
function notify-fail --description "Notify a failure message"
|
||||
terminal-notifier -message "Failure"
|
||||
end
|
@ -1,7 +0,0 @@
|
||||
function notify-result --description "Notify success or failure depending on the result of the previous command"
|
||||
if [ $status -eq 0 ]
|
||||
notify-success
|
||||
else
|
||||
notify-fail
|
||||
end
|
||||
end
|
@ -1,3 +0,0 @@
|
||||
function notify-success --description "Notify a success message"
|
||||
terminal-notifier -message "Success"
|
||||
end
|
@ -1 +0,0 @@
|
||||
thefij
|
@ -1,79 +0,0 @@
|
||||
# name: ifij (forked from RobbyRussel)
|
||||
#
|
||||
# You can override some default options in your config.fish:
|
||||
# set -g theme_display_git_untracked no
|
||||
|
||||
function _status_color
|
||||
# Returns a color for successful or failed previous command
|
||||
if test $last_status -eq 0
|
||||
echo (set_color -o green)
|
||||
else
|
||||
echo (set_color -o red)
|
||||
end
|
||||
end
|
||||
|
||||
function _git_branch_name
|
||||
# Returns the name of the current git branch
|
||||
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
|
||||
end
|
||||
|
||||
function _is_git_dirty
|
||||
# Returns whether or not there is anything uncommitted
|
||||
set -l show_untracked (git config --bool bash.showUntrackedFiles)
|
||||
set untracked ''
|
||||
if [ "$theme_display_git_untracked" = 'no' -o "$show_untracked" = 'false' ]
|
||||
set untracked '--untracked-files=no'
|
||||
end
|
||||
echo (command git status -s --ignore-submodules=dirty $untracked ^/dev/null)
|
||||
end
|
||||
|
||||
function _git_info
|
||||
# Returns what is to be displayed for the git info
|
||||
if [ (_git_branch_name) ]
|
||||
if [ (_is_git_dirty) ]
|
||||
set branch_color (set_color -o red)
|
||||
else
|
||||
set branch_color (set_color -o yellow)
|
||||
end
|
||||
set -l git_branch (_git_branch_name)
|
||||
echo " $branch_color($git_branch)"(set_color normal)
|
||||
end
|
||||
end
|
||||
|
||||
function _hostname
|
||||
# Returns the hostname if not using tmux since tmux will display
|
||||
if [ -z $TMUX ]
|
||||
echo (hostname -s)" "
|
||||
end
|
||||
end
|
||||
|
||||
function _prompt_char
|
||||
# Gives a colored prompt char for user or root
|
||||
echo -n (_status_color)
|
||||
if [ (whoami) = 'root' ]
|
||||
echo -n '#'
|
||||
else
|
||||
echo -n '$'
|
||||
end
|
||||
echo -n (set_color normal)
|
||||
end
|
||||
|
||||
function fish_prompt
|
||||
# Build full left side prompt
|
||||
|
||||
# NOTE: this becomes a global variable
|
||||
set -g last_status $status
|
||||
|
||||
set -l cyan (set_color -o cyan)
|
||||
set -l yellow (set_color -o yellow)
|
||||
set -l red (set_color -o red)
|
||||
set -l blue (set_color -o blue)
|
||||
set -l green (set_color -o green)
|
||||
set -l normal (set_color normal)
|
||||
|
||||
# set -l arrow (_status_color) "➜ $normal"
|
||||
set -l cwd (basename (prompt_pwd))
|
||||
|
||||
echo -n -s $arrow (_hostname) $cwd (_git_info) (_prompt_char) ' '
|
||||
end
|
||||
|
@ -1,35 +0,0 @@
|
||||
# TODO: [force_target] [virtualenv]
|
||||
# TODO: Eventually... make pluggable so plugins can add to prompt
|
||||
|
||||
# function _atf_target
|
||||
# set -l org (atf-target 2> /dev/null) || return
|
||||
# echo " [$org]"
|
||||
# end
|
||||
#
|
||||
set -xg VIRTUAL_ENV_DISABLE_PROMPT 1
|
||||
|
||||
function _force_target
|
||||
if [ (git config force.use) ]
|
||||
set -l org (force-target)
|
||||
echo " [$org]"
|
||||
end
|
||||
end
|
||||
|
||||
function _virtual_env
|
||||
if [ $VIRTUAL_ENV ]
|
||||
set -l venv (basename "$VIRTUAL_ENV")
|
||||
echo " [$venv]"
|
||||
end
|
||||
end
|
||||
|
||||
function fish_right_prompt -d 'Write out the right prompt of thefij theme'
|
||||
set -l cyan (set_color -o cyan)
|
||||
set -l yellow (set_color -o yellow)
|
||||
set -l red (set_color -o red)
|
||||
set -l blue (set_color -o blue)
|
||||
set -l green (set_color -o green)
|
||||
set -l normal (set_color normal)
|
||||
|
||||
echo -n $green (_force_target) (_virtual_env)
|
||||
set_color normal
|
||||
end
|
@ -42,15 +42,13 @@ fi
|
||||
|
||||
# Optional
|
||||
install_sfdc=false
|
||||
is_installed "salesforce"
|
||||
if prompt_yn "Install Salesforce tools?" ; then
|
||||
if ! is_installed "salesforce" && prompt_yn "Install Salesforce tools?" ; then
|
||||
install_sfdc=true
|
||||
fi
|
||||
|
||||
# Optional
|
||||
install_golang=false
|
||||
is_installed "golang"
|
||||
if prompt_yn "Install Go?" ; then
|
||||
if ! command_exist 'go' && prompt_yn "Install Go?" ; then
|
||||
install_golang=true
|
||||
fi
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Install fisherman
|
||||
curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisher
|
||||
|
||||
# Link fisher configs
|
||||
rm -fr "$XDG_CONFIG_HOME/fisherman"
|
||||
try_link "${DEFAULT_ASSETS_PATH}/fisherman" "$XDG_CONFIG_HOME/fisherman"
|
||||
|
||||
# Install from fishfile
|
||||
fish -c 'fisher; exit'
|
@ -1,8 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
local omf_config="$XDG_CONFIG_HOME/omf"
|
||||
try_link "$DEFAULT_ASSETS_PATH" "$omf_config"
|
||||
|
||||
if [ ! -d "$XDG_DATA_HOME/omf" ]; then
|
||||
curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install | fish
|
||||
fi
|
Loading…
Reference in New Issue
Block a user