mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-12-22 18:17:41 +00:00
Fish: Move from alias to abbr
This commit is contained in:
parent
df0f50849f
commit
cb2c0ea26d
@ -1,11 +0,0 @@
|
||||
function source_synced
|
||||
# Sources a config file and corresponding local config file if it exists
|
||||
set -l shared_config "$fish_synced_dir/$argv[1].fish"
|
||||
set -l local_config "$fish_synced_dir/$argv[1].local.fish"
|
||||
if test -f "$shared_config"
|
||||
source "$shared_config"
|
||||
end
|
||||
if test -f "$local_config"
|
||||
source "$local_config"
|
||||
end
|
||||
end
|
@ -1,6 +1,20 @@
|
||||
set -gx fish_function_path "$fish_synced_dir/functions" $fish_function_path
|
||||
set -gx fish_complete_path "$fish_synced_dir/completions" $fish_complete_path
|
||||
|
||||
source_synced 'init/alias'
|
||||
function source_synced --description "Sources file from synced dir as well as optional local file"
|
||||
# Sources a config file and corresponding local config file if it exists
|
||||
set -l shared_config "$fish_synced_dir/$argv[1].fish"
|
||||
set -l local_config "$fish_synced_dir/$argv[1].local.fish"
|
||||
if test -f "$shared_config"
|
||||
source "$shared_config"
|
||||
end
|
||||
if test -f "$local_config"
|
||||
source "$local_config"
|
||||
end
|
||||
end
|
||||
|
||||
if status --is-interactive
|
||||
source_synced 'init/alias'
|
||||
end
|
||||
source_synced 'init/paths'
|
||||
source_synced 'init/env'
|
||||
|
@ -1,37 +1,37 @@
|
||||
# vim
|
||||
alias nv='nvim'
|
||||
alias tv='tmux-vim'
|
||||
alias :q='exit'
|
||||
abbr --global --add nv nvim
|
||||
abbr --global --add tv tmux-vim
|
||||
abbr --global --add :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'
|
||||
abbr --global --add ga git add
|
||||
abbr --global --add gc git commit
|
||||
abbr --global --add gco git checkout
|
||||
abbr --global --add gd git diff
|
||||
abbr --global --add gl git log
|
||||
abbr --global --add gr git rebase
|
||||
abbr --global --add gs git status
|
||||
abbr --global --add tiga tig --all
|
||||
|
||||
# cd
|
||||
alias cd..='cd ..'
|
||||
abbr --global --add cd.. cd ..
|
||||
|
||||
# vim
|
||||
alias mviml='env VIM_COLOR=github mvim'
|
||||
abbr --global --add 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"'
|
||||
abbr --global --add notify-done terminal-notifier -message "Done"
|
||||
abbr --global --add notify-success terminal-notifier -message "Success"
|
||||
abbr --global --add 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"'
|
||||
abbr --global --add pb-done pb "Done"
|
||||
abbr --global --add pb-success pb "Success"
|
||||
abbr --global --add pb-failure pb "Failure"
|
||||
function pb-notify
|
||||
[ $status = 0 ] ;and pb-success ;or pb-failure
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user