forked from sinner-/kickstart-fedora-workstation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.sh
More file actions
83 lines (78 loc) · 1.98 KB
/
Copy pathpost.sh
File metadata and controls
83 lines (78 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
cat > /etc/skel/.gitconfig << "EOF"
[alias]
co = checkout
br = branch --sort=committerdate
ci = commit
st = status
[core]
editor = vim
pager = less -F -X
[credential]
helper = cache --timeout=3600
[pull]
ff = only
[user]
email = you@example.com
name = Your Name
EOF
mkdir -p /etc/skel/.bashrc.d
cat > /etc/skel/.bashrc.d/aliases << "EOF"
alias fgrep='ugrep -F -g '^tags''
alias ll='ls -lart --color=auto'
alias push='git push origin $(git rev-parse --abbrev-ref HEAD)'
alias pull='git pull origin $(git rev-parse --abbrev-ref HEAD)'
alias st='git status'
alias br='git branch'
alias log='git log'
alias log2='git log -2'
alias cherrypick='git cherry-pick'
EOF
cat > /etc/skel/.bashrc.d/bashrc << "EOF"
LANG=en_US.UTF-8
HISTSIZE=20000
HISTFILESIZE=20000
type keychain &> /dev/null && eval $(keychain -q --agents ssh --eval)
[[ -f $HOME/git-prompt.sh ]] && {
. $HOME/git-prompt.sh
PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
GIT_PROMPT_ONLY_IN_REPO=1
GIT_PS1_SHOWCOLORHINTS=1
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUPSTREAM=auto
}
update_git_prompt() {
rm -f $HOME/git-prompt.sh
curl -m9 -o $HOME/git-prompt.sh 'https://raw.githubusercontent.com/git/git/refs/heads/master/contrib/completion/git-prompt.sh'
}
EOF
cat > /etc/skel/.vimrc << "EOF"
let mapleader=' '
set showcmd
set timeout timeoutlen=800
set autoindent
set expandtab
set tabstop=2
set shiftwidth=2
set noincsearch
set hidden
set wildmode=longest:full,full
set nostartofline
set laststatus=2
set statusline=+%t%m%=%l/%L\ %P
set updatetime=1000
set nofileignorecase
set signcolumn=number
nnoremap <c-s> :update<CR>
inoremap <c-s> <c-c>:update<CR>
highlight! link SignColumn LineNr
highlight GitGutterAdd guifg=#009900 ctermfg=2
highlight GitGutterChange guifg=#bbbb00 ctermfg=3
highlight GitGutterDelete guifg=#ff2222 ctermfg=1
let g:gitgutter_set_sign_backgrounds=1
let g:ctrlp_map='<c-p>'
let g:ctrlp_cmd='CtrlPBuffer'
let g:ctrlp_by_filename=1
let g:ctrlp_working_path_mode='c'
EOF
cp /etc/skel/.vimrc /root