mirror of
https://github.com/tomru/DotfilesOld.git
synced 2026-03-04 15:07:23 +01:00
adjust things my way
This commit is contained in:
committed by
Thomas Ruoff
parent
bc1bd4f5e6
commit
0331a6f779
22
aliases
22
aliases
@@ -1,16 +1,16 @@
|
|||||||
# Unix
|
# Unix
|
||||||
alias ll="ls -al"
|
alias ls='ls --color=tty'
|
||||||
alias ln="ln -v"
|
alias ll='ls -al'
|
||||||
alias mkdir="mkdir -p"
|
alias ln='ln -v'
|
||||||
alias e="$EDITOR"
|
alias mkdir='mkdir -p'
|
||||||
alias v="$VISUAL"
|
alias e='$EDITOR'
|
||||||
|
alias v='$VISUAL'
|
||||||
|
alias _='sudo'
|
||||||
|
alias nohist='unset HISTFILE'
|
||||||
|
|
||||||
# Bundler
|
alias ta='tmux attach -t'
|
||||||
alias b="bundle"
|
alias ts='tmux new-session -s'
|
||||||
|
alias tl='tmux list-sessions'
|
||||||
# Rails
|
|
||||||
alias migrate="rake db:migrate db:rollback && rake db:migrate db:test:prepare"
|
|
||||||
alias s="rspec"
|
|
||||||
|
|
||||||
# Pretty print the path
|
# Pretty print the path
|
||||||
alias path='echo $PATH | tr -s ":" "\n"'
|
alias path='echo $PATH | tr -s ":" "\n"'
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
#compdef ag
|
|
||||||
|
|
||||||
if (( CURRENT == 2 )); then
|
|
||||||
compadd $(cut -f 1 tmp/tags .git/tags 2>/dev/null)
|
|
||||||
else;
|
|
||||||
_files
|
|
||||||
fi
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
#compdef bundle
|
|
||||||
|
|
||||||
local curcontext="$curcontext" state line _gems _opts ret=1
|
|
||||||
|
|
||||||
_arguments -C -A "-v" -A "--version" \
|
|
||||||
'(- 1 *)'{-v,--version}'[display version information]' \
|
|
||||||
'1: :->cmds' \
|
|
||||||
'*:: :->args' && ret=0
|
|
||||||
|
|
||||||
case $state in
|
|
||||||
cmds)
|
|
||||||
_values "bundle command" \
|
|
||||||
"install[Install the gems specified by the Gemfile or Gemfile.lock]" \
|
|
||||||
"update[Update dependencies to their latest versions]" \
|
|
||||||
"package[Package the .gem files required by your application]" \
|
|
||||||
"exec[Execute a script in the context of the current bundle]" \
|
|
||||||
"config[Specify and read configuration options for bundler]" \
|
|
||||||
"check[Determine whether the requirements for your application are installed]" \
|
|
||||||
"list[Show all of the gems in the current bundle]" \
|
|
||||||
"show[Show the source location of a particular gem in the bundle]" \
|
|
||||||
"console[Start an IRB session in the context of the current bundle]" \
|
|
||||||
"open[Open an installed gem in the editor]" \
|
|
||||||
"lock[Generate a lockfile for your dependencies]" \
|
|
||||||
"viz[Generate a visual representation of your dependencies]" \
|
|
||||||
"init[Generate a simple Gemfile, placed in the current directory]" \
|
|
||||||
"gem[Create a simple gem, suitable for development with bundler]" \
|
|
||||||
"help[Describe available tasks or one specific task]" \
|
|
||||||
"platform[Displays platform compatibility information]" \
|
|
||||||
"outdated[Show all of the outdated gems in the current bundle]" \
|
|
||||||
"clean[Cleans up unused gems in your bundler directory]"
|
|
||||||
ret=0
|
|
||||||
;;
|
|
||||||
args)
|
|
||||||
case $line[1] in
|
|
||||||
help)
|
|
||||||
_values 'commands' 'install' 'update' 'package' 'exec' 'config' 'check' 'list' 'show' 'console' 'open' 'lock' 'viz' 'init' 'gem' 'help' 'platform' 'outdated' 'clean' && ret=0
|
|
||||||
;;
|
|
||||||
install)
|
|
||||||
_arguments \
|
|
||||||
'(--no-color)--no-color[disable colorization in output]' \
|
|
||||||
'(--local)--local[do not attempt to connect to rubygems.org]' \
|
|
||||||
'(--quiet)--quiet[only output warnings and errors]' \
|
|
||||||
'(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \
|
|
||||||
'(--system)--system[install to the system location]' \
|
|
||||||
'(--deployment)--deployment[install using defaults tuned for deployment environments]' \
|
|
||||||
'(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \
|
|
||||||
'(--path)--path=-[specify a different path than the system default]:path:_files' \
|
|
||||||
'(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \
|
|
||||||
'(--without)--without=-[exclude gems that are part of the specified named group]:groups'
|
|
||||||
ret=0
|
|
||||||
;;
|
|
||||||
exec)
|
|
||||||
_normal && ret=0
|
|
||||||
;;
|
|
||||||
(open|show)
|
|
||||||
_gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') )
|
|
||||||
if [[ $_gems != "" ]]; then
|
|
||||||
_values 'gems' $_gems && ret=0
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
_opts=( $(bundle help $line[1] | sed -e '/^ \[-/!d; s/^ \[\(-[^=]*\)=.*/\1/') )
|
|
||||||
_opts+=( $(bundle help $line[1] | sed -e '/^ -/!d; s/^ \(-.\), \[\(-[^=]*\)=.*/\1 \2/') )
|
|
||||||
if [[ $_opts != "" ]]; then
|
|
||||||
_values 'options' $_opts && ret=0
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
return ret
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#compdef production
|
|
||||||
compdef production=heroku
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#compdef rspec
|
|
||||||
|
|
||||||
compadd -P spec/ $(ls spec/**/*_spec.rb | sed -E "s/spec\///g")
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#compdef staging
|
|
||||||
compdef staging=heroku
|
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
# makes color constants available
|
# makes color constants available
|
||||||
autoload -U colors
|
autoload -U colors
|
||||||
colors
|
colors
|
||||||
|
|
||||||
# enable colored output from ls, etc. on FreeBSD-based systems
|
|
||||||
export CLICOLOR=1
|
|
||||||
|
|||||||
1
zsh/configs/fzf.zsh
Normal file
1
zsh/configs/fzf.zsh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
@@ -3,15 +3,3 @@ stty -ixon
|
|||||||
|
|
||||||
# vi mode
|
# vi mode
|
||||||
bindkey -v
|
bindkey -v
|
||||||
bindkey "^F" vi-cmd-mode
|
|
||||||
|
|
||||||
# handy keybindings
|
|
||||||
bindkey "^A" beginning-of-line
|
|
||||||
bindkey "^E" end-of-line
|
|
||||||
bindkey "^K" kill-line
|
|
||||||
bindkey "^R" history-incremental-search-backward
|
|
||||||
bindkey "^P" history-search-backward
|
|
||||||
bindkey "^Y" accept-and-hold
|
|
||||||
bindkey "^N" insert-last-word
|
|
||||||
bindkey "^Q" push-line-or-edit
|
|
||||||
bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy"
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# load our own completion functions
|
# load our own completion functions
|
||||||
fpath=(~/.zsh/completion /usr/local/share/zsh/site-functions $fpath)
|
fpath=(~/.zsh/completion $fpath)
|
||||||
|
|
||||||
# completion
|
# completion
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
# ensure dotfiles bin directory is loaded first
|
# ensure dotfiles bin directory is loaded first
|
||||||
PATH="$HOME/.bin:/usr/local/sbin:$PATH"
|
PATH="$HOME/local/bin:$PATH"
|
||||||
|
|
||||||
# load rbenv if available
|
# load rbenv if available
|
||||||
if command -v rbenv >/dev/null; then
|
if command -v rbenv >/dev/null; then
|
||||||
eval "$(rbenv init - --no-rehash)"
|
eval "$(rbenv init - --no-rehash)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# mkdir .git/safe in the root of repositories you trust
|
# nvm
|
||||||
PATH=".git/safe/../../bin:$PATH"
|
NVM_DIR="$HOME/.nvm"
|
||||||
|
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
|
||||||
|
|
||||||
export -U PATH
|
export -U PATH
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# modify the prompt to contain git branch name if applicable
|
# modify the prompt to contain git branch name if applicable
|
||||||
git_prompt_info() {
|
git_prompt_info() {
|
||||||
current_branch=$(git current-branch 2> /dev/null)
|
current_branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
|
||||||
if [[ -n $current_branch ]]; then
|
if [[ -n $current_branch ]]; then
|
||||||
echo " %{$fg_bold[green]%}$current_branch%{$reset_color%}"
|
echo " %{$fg_bold[green]%}$current_branch%{$reset_color%}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
_git_delete_branch ()
|
|
||||||
{
|
|
||||||
__gitcomp "$(__git_heads)"
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# Change file extensions recursively in current directory
|
|
||||||
#
|
|
||||||
# change-extension erb haml
|
|
||||||
|
|
||||||
function change-extension() {
|
|
||||||
foreach f (**/*.$1)
|
|
||||||
mv $f $f:r.$2
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# Load .env file into shell session for environment variables
|
|
||||||
|
|
||||||
function envup() {
|
|
||||||
if [ -f .env ]; then
|
|
||||||
export $(cat .env)
|
|
||||||
else
|
|
||||||
echo 'No .env file found' 1>&2
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user