This commit is contained in:
Nemo 2019-01-25 01:40:35 +05:30
parent 294d642638
commit fdc9db8810
3 changed files with 148 additions and 17 deletions

View File

@ -320,6 +320,15 @@ alias dri='docker run --volume /home/nemo/tmp:/data --tty --rm --interactive --e
alias dri_cwd='docker run --volume `pwd`:/current --volume /home/nemo/tmp:/data --tty --rm --interactive --entrypoint /bin/sh '
alias dockerlint='LC_ALL=C hadolint'
##### Terraform
alias t=terraform
alias tp='terraform plan'
alias tpt='terraform plan --target '
alias ta='terraform apply'
alias tat='terraform apply --target '
alias tfa='terraform apply --auto-approve'
alias tfat='terraform apply --auto-approve --target '
##### History Shenanigans
export HISTCONTROL=ignorespace:ignoredups:erasedups # for 'ignoreboth': ignore duplicates and /^\s/
export HISTFILE='/home/nemo/.bash_history'
@ -367,7 +376,7 @@ export TF_PLUGIN_CACHE_DIR="$HOME/.terraform.d/plugin-cache"
# Manage multiple Git identities
# karn https://github.com/prydonius/karn
if which karn > /dev/null; then eval "$(karn init)"; fi
if command -v karn > /dev/null; then eval "$(karn init)"; fi
# Disable beeps
xset -b

129
files/git/.scmbrc Normal file
View File

@ -0,0 +1,129 @@
#
# Git File Shortcuts Config
# ----------------------------------------------
# - Set your preferred prefix for env variable file shortcuts.
# (I chose 'e' because it is easy to slide your finger to it from '$'.)
export git_env_char="e"
# - Max changed files before reverting to 'git status'. git_status_shortcuts() will be slower for lots of changed files.
export gs_max_changes="150"
# - When using the git_add_shorcuts() command, automatically invoke 'git rm' to remove deleted files?
export ga_auto_remove="yes"
# - Set the following option to 'no' if you want to use your existing git aliases
# instead of overwriting them.
# Note: Bash tab completion will not be automatically set up for your aliases if you disable this option.
export git_setup_aliases="yes"
# Git Index Config
# ----------------------------------------------
# Repos will be automatically added from this directory.
export GIT_REPO_DIR="$HOME/projects/personal"
# Add the full paths of any extra repos to GIT_REPOS, separated with ':'
# e.g. "/opt/rails/project:/opt/rails/another project:$HOME/other/repo"
export GIT_REPOS=""
export git_status_command="git_status_shortcuts"
# Alias
git_index_alias="c" # Switch to a repo in the (c)ode directory
# Git Aliases
# ----------------------------------------------
git_alias="g"
# 1. 'SCM Breeze' functions
git_status_shortcuts_alias="gs"
git_add_shortcuts_alias="ga"
exec_scmb_expand_args_alias="ge"
git_show_files_alias="gsf"
git_commit_all_alias="gca"
git_grep_shortcuts_alias="gtrep"
# 2. Commands that handle paths (with shortcut args expanded)
git_checkout_alias="gco"
git_checkout_branch_alias="gcb"
git_commit_alias="gc"
git_commit_verbose_alias="gcv"
git_reset_alias="grs"
git_reset_hard_alias="grsh"
git_rm_alias="grm"
git_blame_alias="gbl"
git_diff_alias="gd"
git_diff_no_whitespace_alias="gdnw"
git_diff_file_alias="gdf"
git_diff_word_alias="gdw"
git_diff_cached_alias="gdc"
git_difftool_alias="gdt"
git_mergetool_alias="gmt"
# 3. Standard commands
git_clone_alias="gcl"
git_fetch_alias="gf"
git_fetch_all_alias="gfa"
git_fetch_and_rebase_alias="gfr"
git_pull_alias="gpl"
git_pull_rebase_alias="gplr"
git_push_alias="gps"
git_push_force_alias="gpsf"
git_pull_then_push_alias="gpls"
git_status_original_alias="gst"
git_status_short_alias="gss"
git_clean_alias="gce"
git_clean_force_alias="gcef"
git_add_all_alias="gaa"
git_add_patch_alias="gap"
git_add_updated_alias="gau"
git_commit_amend_alias="gcm"
git_commit_amend_no_msg_alias="gcmh"
git_commit_no_msg_alias="gch"
git_remote_alias="gr"
git_branch_alias="gb"
git_branch_all_alias="gba"
git_branch_move_alias="gbm"
git_branch_delete_alias="gbd"
git_branch_delete_force_alias="gbD"
git_rebase_alias="grb"
git_rebase_interactive_alias="grbi"
git_rebase_alias_continue="grbc"
git_rebase_alias_abort="grba"
git_reset_last_commit="grsl"
git_merge_alias="gm"
git_merge_no_fast_forward_alias="gmnff"
git_merge_only_fast_forward_alias="gmff"
git_cherry_pick_alias="gcp"
git_log_alias="gl"
git_log_all_alias="gla"
git_log_stat_alias="glst"
git_log_graph_alias="glg"
git_show_alias="gsh"
git_show_summary="gsm" # (gss taken by git status short)
git_stash_alias="gash"
git_stash_apply_alias="gasha"
git_stash_pop_alias="gashp"
git_stash_list_alias="gashl"
git_tag_alias="gt"
git_submodule_update_alias="gsu"
git_submodule_update_rec_alias="gsur"
git_top_level_alias="gtop"
git_whatchanged_alias="gwc"
git_apply_alias="gapp"
# Hub aliases (https://github.com/github/hub)
git_pull_request_alias="gpr"
# Git Keyboard Shortcuts
# ----------------------------------------------
# Keyboard shortcuts are on by default. Set this to 'false' to disable them.
git_keyboard_shortcuts_enabled="true"
git_commit_all_keys="\C-x " # CTRL+x, SPACE
git_add_and_commit_keys="\C-xc" # CTRL+x, c
git_commit_all_with_ci_skip_keys="\C-xv" # CTRL+x, v (Appends [ci skip] to message)
git_add_and_amend_commit_keys="\C-xz" # CTRL+x, z
# Shell Command Wrapping
# ----------------------------------------------
# Expand numbered args for common shell commands
shell_command_wrapping_enabled="true"
# Here you can tweak the list of wrapped commands.
scmb_wrapped_shell_commands="vim emacs gedit cat rm cp mv ln cd"
# Add numbered shortcuts to output of ls -l, just like 'git status'
shell_ls_aliases_enabled="true"

View File

@ -1,24 +1,17 @@
Host *
SendEnv no
SendEnv no
Host bitbucket.org
Compression yes
ControlMaster yes
ControlPersist 1h
Compression yes
ControlMaster yes
ControlPersist 1h
Host gh
HostName github.com
User git
Compression yes
ControlMaster yes
ControlPersist 1h
Host koding
User captn3m0
HostName vm-0.captn3m0.koding.kd.io
ProxyCommand ssh %r@ssh.koding.com nc %h %p
Protocol 2
ServerAliveInterval 60
HostName github.com
User git
Compression yes
ControlMaster yes
ControlPersist 1h
Host 35.*.*.*
User abhay