mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-12-22 17:07:42 +00:00
Add support for both omf and fisherman
omf seems a bit janky at times. Giving fisherman a shot
This commit is contained in:
parent
96e35a7ebe
commit
028d0a56a0
11
assets/default/fisherman/fish/functions/source_config.fish
Normal file
11
assets/default/fisherman/fish/functions/source_config.fish
Normal file
@ -0,0 +1,11 @@
|
||||
function source_config
|
||||
# Sources a config file and corresponding local config file if it exists
|
||||
set shared_config "$fisher_config/init/$argv[1].fish"
|
||||
set local_config "$fisher_config/init/$argv[1].local.fish"
|
||||
if test -f "$shared_config"
|
||||
source "$shared_config"
|
||||
end
|
||||
if test -f "$local_config"
|
||||
source "$local_config"
|
||||
end
|
||||
end
|
161
assets/default/fisherman/fisherman/cache/.index
vendored
Normal file
161
assets/default/fisherman/fisherman/cache/.index
vendored
Normal file
@ -0,0 +1,161 @@
|
||||
autoenvstack
|
||||
https://github.com/hutenosa/autoenvstack
|
||||
Tree-based autoenv
|
||||
env autoenv source autoenvfish cd set
|
||||
hutenosa
|
||||
|
||||
autoinit
|
||||
https://github.com/fishery/autoinit
|
||||
Add init_* event support
|
||||
init emit events omf source
|
||||
bucaran
|
||||
|
||||
available
|
||||
https://github.com/fishery/available
|
||||
Check if a function or command is available
|
||||
check test status clean type callable legacy compatibility
|
||||
bucaran
|
||||
|
||||
bass
|
||||
https://github.com/edc/bass
|
||||
Compatibility layer for bash utilities
|
||||
tool bash fish script wrapper env
|
||||
edc
|
||||
|
||||
bobthefish
|
||||
https://github.com/oh-my-fish/theme-bobthefish
|
||||
Powerline, Git-aware prompt optimized for awesome
|
||||
omf theme prompt powerline yellow green red glyphs git bob
|
||||
bobthecow
|
||||
|
||||
cmorrell
|
||||
https://github.com/oh-my-fish/theme-cmorrell.com
|
||||
Flat, Git-aware, left and right prompt
|
||||
omf theme prompt flat git right git
|
||||
inxilpro
|
||||
|
||||
errno
|
||||
https://github.com/oh-my-fish/plugin-errno
|
||||
POSIX error code/string translator
|
||||
omf posix errno strerror einval error code enavail
|
||||
derekstavis
|
||||
|
||||
fishtape
|
||||
https://github.com/fishery/fishtape
|
||||
TAP producer and test harness
|
||||
test tool harness tap unit-testing
|
||||
bucaran
|
||||
|
||||
flash
|
||||
https://github.com/fishery/flash
|
||||
Flash-inspired, thunder red and yellow theme
|
||||
theme prompt flash dc superhero red yellow thunder
|
||||
bucaran
|
||||
|
||||
get
|
||||
https://github.com/fishery/get
|
||||
Press any key to continue
|
||||
stty read line ui cli key character
|
||||
bucaran
|
||||
|
||||
git-branch-name
|
||||
https://github.com/fishery/git-branch-name
|
||||
Get the current branch in a Git repository
|
||||
git status info function compatibility
|
||||
bucaran
|
||||
|
||||
git-status
|
||||
https://github.com/fishery/git-status
|
||||
Git status query functions
|
||||
git status info function compatibility
|
||||
bucaran
|
||||
|
||||
hulk
|
||||
https://github.com/fishery/hulk
|
||||
Hulk-inspired, powerful green theme
|
||||
theme prompt hulk marvel superhero green purple fist
|
||||
bucaran
|
||||
|
||||
lambda
|
||||
https://github.com/hasanozgan/theme-lambda
|
||||
Multiline, git-ware lambda prompt
|
||||
theme prompt multiline git lambda
|
||||
hasanozgan
|
||||
|
||||
legacy
|
||||
https://github.com/fishery/legacy
|
||||
Compatibility with Oh My Fish!
|
||||
omf compatibility legacy
|
||||
bucaran
|
||||
|
||||
lolfish
|
||||
https://github.com/er0/lolfish
|
||||
Tmux-aware, rainbow gradient prompt
|
||||
theme prompt tmux git rainbow multicolor color
|
||||
er0
|
||||
|
||||
nelsonjchen
|
||||
https://github.com/nelsonjchen/omf-theme-nelsonjchen
|
||||
Git-aware, colorful re5et-inspired theme
|
||||
theme prompt git tmux 12-hour omz re5et nelsonjchen
|
||||
nelsonjchen
|
||||
|
||||
pure
|
||||
https://github.com/rafaelrinaldi/pure
|
||||
Pretty, minimal and fast prompt
|
||||
theme prompt minimal simple sindresorhus pure
|
||||
rafaelrinaldi
|
||||
|
||||
submit
|
||||
https://github.com/fishery/submit
|
||||
Submit a plugin to the index
|
||||
fisherman contrib index plugin register db
|
||||
bucaran
|
||||
|
||||
shellder
|
||||
https://github.com/simnalamburt/shellder
|
||||
Powerline prompt optimized for speed
|
||||
theme prompt powerline speed
|
||||
simnalamburt
|
||||
|
||||
scorphish
|
||||
https://github.com/oh-my-fish/theme-scorphish
|
||||
Hot, angle bracket-based multiline prompt
|
||||
omf theme prompt multiline git angle
|
||||
scorphus
|
||||
|
||||
shark
|
||||
https://github.com/fishery/shark
|
||||
Fantastic Sparkline Generator
|
||||
chart tool report sparkline graph
|
||||
bucaran
|
||||
|
||||
scaffold
|
||||
https://github.com/fishery/scaffold
|
||||
Scaffold out a fish plugin
|
||||
create plugin generator boilerplate fish fisherman
|
||||
bucaran
|
||||
|
||||
tab
|
||||
https://github.com/oh-my-fish/plugin-tab
|
||||
Open new tabs from the command line
|
||||
omf tab window terminal iterm console tool command
|
||||
bobthecow
|
||||
|
||||
technicolor
|
||||
https://github.com/oh-my-fish/plugin-technicolor
|
||||
Text colorization declarative DSL
|
||||
omf color ansi set_color styles text
|
||||
derekstavis
|
||||
|
||||
title
|
||||
https://github.com/oh-my-fish/plugin-title
|
||||
Change the tab/window title string
|
||||
omf window console title display customize titlebar
|
||||
derekstavis
|
||||
|
||||
vi-mode
|
||||
https://github.com/oh-my-fish/plugin-vi-mode
|
||||
Basic vi key bindings emulation
|
||||
omf vi vim mode key bindings emulate python
|
||||
syl20bnr
|
0
assets/default/fisherman/fisherman/fishfile
Normal file
0
assets/default/fisherman/fisherman/fishfile
Normal file
17
assets/default/fisherman/fisherman/init/alias.local.fish
Normal file
17
assets/default/fisherman/fisherman/init/alias.local.fish
Normal file
@ -0,0 +1,17 @@
|
||||
# yelp
|
||||
alias moshdev='mosh dev7-devc fish'
|
||||
alias sshadev='ssh -t -A dev7-devc fish'
|
||||
# Copy remote tmux clipboard
|
||||
alias rpbcopy='ssh dev7-devc "TMPDIR=/nail/tmp tmux show-buffer" | pbcopy'
|
||||
alias rmpbcopy='mosh dev7-devc "TMPDIR=/nail/tmp tmux show-buffer" | pbcopy'
|
||||
|
||||
alias force-login-dev='force login ;and rsync -av /Users/ifij/.force/accounts/ dev7-devc:~/.force/accounts'
|
||||
|
||||
# projects
|
||||
alias cd-sf='cd ~/workspace/salesforce-apex'
|
||||
|
||||
# vagrant
|
||||
alias vssh='vagrant ssh'
|
||||
alias vmosh='mosh vagrant@localhost -p 2222'
|
||||
alias vrl='vagrant reload'
|
||||
alias vbm='mosh -p 3122 --ssh="ssh -p 3022" ifij@localhost'
|
37
assets/default/oh-my-fish/alias.fish
Normal file
37
assets/default/oh-my-fish/alias.fish
Normal file
@ -0,0 +1,37 @@
|
||||
# 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
|
55
assets/default/oh-my-fish/paths.fish
Normal file
55
assets/default/oh-my-fish/paths.fish
Normal file
@ -0,0 +1,55 @@
|
||||
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"
|
79
assets/default/oh-my-fish/themes/thefij/fish_prompt.fish
Normal file
79
assets/default/oh-my-fish/themes/thefij/fish_prompt.fish
Normal file
@ -0,0 +1,79 @@
|
||||
# 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
|
||||
|
@ -0,0 +1,35 @@
|
||||
# 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
|
@ -57,9 +57,19 @@ fi
|
||||
|
||||
# Optional
|
||||
install_fish=false
|
||||
install_ohmyfish=false
|
||||
install_fisherman=false
|
||||
is_installed "fish"
|
||||
is_installed "oh-my-fish"
|
||||
is_installed "fisherman"
|
||||
if prompt_yn "Install fish?" ; then
|
||||
install_fish=true
|
||||
|
||||
if prompt_yn "Install oh-my-fish?" ; then
|
||||
install_ohmyfish=true
|
||||
elif prompt_yn "Install Fisherman?" ; then
|
||||
install_fisherman=true
|
||||
fi
|
||||
fi
|
||||
|
||||
### Run recipes
|
||||
@ -102,10 +112,17 @@ fi
|
||||
|
||||
if $install_fish ; then
|
||||
recipe 'fish-install'
|
||||
recipe 'fish-config'
|
||||
set_installed 'fish'
|
||||
fi
|
||||
|
||||
if $install_ohmyfish ; then
|
||||
recipe 'oh-my-fish'
|
||||
fi
|
||||
|
||||
if $install_fisherman ; then
|
||||
recipe 'fisherman'
|
||||
fi
|
||||
|
||||
### Show the Finished banner
|
||||
finished
|
||||
|
||||
|
16
recipes/default/fisherman
Normal file
16
recipes/default/fisherman
Normal file
@ -0,0 +1,16 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [ ! -d "$fisher_home" ]; then
|
||||
curl -L install.fisherman.sh | fish
|
||||
rm -fr "$fisher_config"
|
||||
fi
|
||||
|
||||
try_link "${DEFAULT_ASSETS_PATH}/fisherman" "$HOME/.config/fisherman"
|
||||
|
||||
add_line "source_config paths" ~/.config/fish/config.fish
|
||||
add_line "source_config alias" ~/.config/fish/config.fish
|
||||
|
||||
# Link functions
|
||||
for func in ${DEFAULT_ASSETS_PATH}/fish/functions/*.fish; do
|
||||
try_link "$func" $HOME/.config/fish/functions/$(basename $func)
|
||||
done
|
@ -3,6 +3,6 @@
|
||||
local omf_config="$XDG_CONFIG_HOME/omf"
|
||||
try_link "$DEFAULT_ASSETS_PATH" "$omf_config"
|
||||
|
||||
if [ ! -d "$XDG_DATA_HOME/.omf" ]; then
|
||||
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