-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The fish shell requires less configuration and fiddling than zsh, so let's give it a try, POSIX-be-damned. Signed-off-by: Stephen Celis <stephen@stephencelis.com>
- Loading branch information
0 parents
commit 9783dcb
Showing
21 changed files
with
439 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
config/fish/fishd.* | ||
config/fish/fish_history | ||
config/fish/fish_read_history | ||
config/fish/generated_completions | ||
|
||
config/hub | ||
|
||
vim/.netrwhist | ||
vim/plugged | ||
vim/tmp/* | ||
!vim/tmp/.gitkeep |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "vim-plug"] | ||
path = vim-plug | ||
url = https://github.com/junegunn/vim-plug |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
symlinks = \ | ||
config \ | ||
gitconfig \ | ||
gitignore \ | ||
lldbinit \ | ||
local \ | ||
ruby-version \ | ||
vim \ | ||
vimrc \ | ||
|
||
formulas = \ | ||
chisel \ | ||
elasticsearch \ | ||
elixir \ | ||
fish \ | ||
fry \ | ||
ghc \ | ||
go \ | ||
hub \ | ||
lua \ | ||
mercurial \ | ||
mysql \ | ||
node \ | ||
postgres \ | ||
redis \ | ||
ruby-install \ | ||
rust \ | ||
the_silver_searcher \ | ||
tree \ | ||
|
||
update: install | ||
brew update | ||
brew upgrade | ||
brew cleanup | ||
|
||
install: brew ln ruby | ||
|
||
# brew | ||
|
||
homebrew_root = /usr/local | ||
cellar = $(homebrew_root)/Cellar | ||
taps = $(homebrew_root)/Library/Taps | ||
ruby_version := $(shell cat $(PWD)/ruby-version) | ||
|
||
prefixed_formulas = $(addprefix $(cellar)/,$(formulas)) | ||
brew: $(prefixed_formulas) $(macvim) | ||
|
||
homebrew = $(homebrew_root)/bin/brew | ||
$(homebrew): | ||
@ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
|
||
$(prefixed_formulas): $(homebrew) | ||
brew install $(notdir $@) | ||
@touch $@ | ||
|
||
macvim = $(cellar)/macvim | ||
$(macvim): $(homebrew) | ||
brew install macvim \ | ||
--override-system-vim \ | ||
--with-lua \ | ||
@touch $(macvim) | ||
|
||
homebrew_fry = $(taps)/igas/homebrew-fry | ||
$(homebrew_fry): | ||
brew tap igas/fry | ||
@touch $(homebrew_fry) | ||
|
||
$(cellar)/fry: $(homebrew_fry) | ||
|
||
# ln | ||
|
||
prefixed_symlinks = $(addprefix $(HOME)/.,$(symlinks)) | ||
ln: $(prefixed_symlinks) | ||
|
||
$(prefixed_symlinks): | ||
@ln -Fsv $(PWD)/$(patsubst .%,%,$(notdir $@)) $@ | ||
|
||
# ruby | ||
|
||
ruby = $(HOME)/.rubies/ruby-$(ruby_version) | ||
ruby: $(ruby) | ||
|
||
$(ruby): $(HOME)/.ruby-version $(cellar)/ruby-install | ||
ruby-install ruby $(ruby_version) | ||
|
||
# make | ||
|
||
.PHONY: update |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# dotfiles | ||
|
||
I `make` do. | ||
|
||
- Provides configuration for [the friendly interactive shell][fish]. | ||
- Installs [Homebrew][brew] and various formulas. | ||
- Installs [vim-plug][] to manage Vim. | ||
- Symlinks dotfiles and dotdirectories. | ||
- Keeps the above up-to-date. | ||
|
||
|
||
[fish]: http://fishshell.com | ||
[brew]: http://brew.sh | ||
[vim-plug]: https://github.com/junegunn/vim-plug |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
function __d_complete_directory | ||
set -g dev_dir $DEVELOPER | ||
set dev_dirs (echo (commandline) | tr ' ' \n) | ||
set -e dev_dirs[1] | ||
|
||
for dir in $dev_dirs | ||
set -g dev_dir "$dev_dir/$dir" | ||
end | ||
|
||
if test -d $dev_dir | ||
command ls -d $dev_dir/*/ | xargs -n1 basename | ||
else | ||
command ls -d $dev_dir*/ | xargs -n1 basename | ||
end | ||
end | ||
|
||
complete -xc d -a "(__d_complete_directory)" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# we're already acquainted, thanks | ||
set -e fish_greeting | ||
|
||
# universal | ||
set -x PATH $HOME/.local/bin $PATH | ||
set -x EDITOR vim | ||
set -x VISUAL $EDITOR | ||
|
||
set -x __fish_git_prompt_show_informative_status 1 | ||
|
||
# local | ||
set -x DEVELOPER ~/Developer | ||
|
||
# aliases | ||
alias ag 'ag --smart-case' | ||
|
||
# ruby | ||
if test -f /usr/local/share/fry/fry.fish | ||
source /usr/local/share/fry/fry.fish | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
function d --description 'Like z, but d' | ||
cd $DEVELOPER | ||
for dir in $argv | ||
cd $dir*/ | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
function fish_prompt --description 'Write out the prompt' | ||
|
||
set -l last_status $status | ||
|
||
if not set -q __fish_prompt_normal | ||
set -g __fish_prompt_normal (set_color normal) | ||
end | ||
|
||
# PWD | ||
set_color $fish_color_cwd | ||
echo -n (prompt_pwd) | ||
set_color normal | ||
|
||
printf '%s ' (__fish_git_prompt ' %s') | ||
|
||
if not test $last_status -eq 0 | ||
set_color $fish_color_error | ||
end | ||
|
||
echo -n '$ ' | ||
|
||
set_color normal | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
function fish_right_prompt --description 'Write out the right-hand prompt' | ||
if contains fry (functions) | ||
set -l color (set_color 111) | ||
set -l normal (set_color normal) | ||
|
||
echo $color(fry current)$normal | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function fish_title --description 'Write out a proper window title' | ||
printf '\a\e]7;file:///%s' (echo -n $PWD | sed 's/ /%20/g') | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function xcopen --description 'Open the nearest Xcode workspace or project' | ||
pushd *.{xcworkspace,xcodeproj} | ||
and open . | ||
and popd | ||
or \ | ||
if test $PWD != / | ||
pushd .. | ||
xcopen | ||
popd | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[user] | ||
name = Stephen Celis | ||
email = stephen@stephencelis.com | ||
[alias] | ||
br = branch | ||
ci = commit -s -v | ||
co = checkout | ||
di = diff | ||
st = status -s | ||
[branch] | ||
autosetuprebase = always | ||
[color] | ||
ui = auto | ||
[core] | ||
excludesfile = ~/.gitignore | ||
[credential] | ||
helper = osxkeychain | ||
[diff] | ||
renames = copies | ||
[log] | ||
decorate = auto | ||
[merge] | ||
conflictstyle = diff3 | ||
tool = vimdiff | ||
[pager] | ||
blame = less -S | ||
diff = /usr/local/share/git-core/contrib/diff-highlight/diff-highlight | less | ||
log = /usr/local/share/git-core/contrib/diff-highlight/diff-highlight | less | ||
show = /usr/local/share/git-core/contrib/diff-highlight/diff-highlight | less | ||
[push] | ||
default = current | ||
[pull] | ||
rebase = true | ||
[rebase] | ||
autosquash = true | ||
autostash = true | ||
[rerere] | ||
autoupdate = true | ||
enabled = true | ||
[github] | ||
user = stephencelis | ||
[filter "hawser"] | ||
clean = git hawser clean %f | ||
required = true | ||
smudge = git hawser smudge %f |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*~ | ||
*.bak | ||
*.log | ||
*.pid | ||
*.swp | ||
.DS_Store | ||
tmp/**/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
command script import /usr/local/opt/chisel/libexec/fblldb.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# | ||
# Original by Gary Bernhardt: | ||
# | ||
# https://raw.github.com/garybernhardt/dotfiles/master/.githelpers | ||
# | ||
# Log output: | ||
# | ||
# 51c333e 2012-07-12 Gary Bernhardt add vim-eunuch | ||
# | ||
# The log format uses } characters between each field, and `column` is later | ||
# used to split on them. A } in the commit subject or any other field will | ||
# break this. | ||
|
||
HASH="%C(yellow)%h%Creset" | ||
DATE="%C(green)%ad%Creset" | ||
AUTHOR="%C(bold blue)%an%Creset" | ||
REFS="%C(red)%d%Creset" | ||
SUBJECT="%s" | ||
|
||
FORMAT="$HASH}$DATE}$AUTHOR}$REFS $SUBJECT" | ||
|
||
git log --pretty="tformat:${FORMAT}" --date=short $* | | ||
# Line columns up based on } delimiter | ||
column -s '}' -t | | ||
# Page only if we need to | ||
less -FXRS | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
prune_merged_local() { | ||
git branch --list --merged | | ||
grep --invert-match --extended-regexp '\*|master' | | ||
xargs -n 1 git branch --delete | ||
} | ||
|
||
prune_merged_remotes() { | ||
git fetch origin | ||
git remote prune origin | ||
git branch --list --remote --merged $1 | | ||
grep --invert-match --extended-regexp "HEAD|master|$1" | | ||
sed 's/ *origin\///' | | ||
xargs -p -I branch git push origin :branch | ||
} | ||
|
||
test -n "$1" && prune_merged_remotes $@ || prune_merged_local |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.2.1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/Users/stephen/Developer/dotfiles/vim-plug/plug.vim |
Empty file.
Oops, something went wrong.