Skip to content

Instantly share code, notes, and snippets.

@prabirshrestha
Last active June 3, 2022 01:19
  • Star 68 You must be signed in to star a gist
  • Fork 19 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save prabirshrestha/279d8b179d9353fe8694 to your computer and use it in GitHub Desktop.
my terminal settings for windows
# curl -Lk https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.bash_profile -o ~/.bash_profile
[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh # This loads NVM
export PATH="$HOME/.cargo/bin:$HOME/go/bin:$HOME/Library/Python/3.7/bin:$PATH"
export PATH="$HOME/.config/nvim/plugins/vim-themis/bin:$PATH"
stty -ixon
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
# alias
alias ls='ls -Gp'
alias vi='nvim'
alias v='vim'
# git alias
alias g='git'
alias ga='git add'
alias gb='git branch'
alias gba='git branch -a'
alias gca='git commit -a'
alias gclean='git clean -xdf'
alias gcm='git checkout master'
alias gco='git checkout'
alias gcp='git cherry-pick'
alias gf='git fetch'
alias gl='git log --oneline --graph --decorate'
alias gm='git merge'
alias gmt='git mergetool'
alias gp='git push origin HEAD'
alias gs='git status'
alias gup='git fetch && git rebase'
gpr() {
git fetch origin pull/${1}/head:pr${1}
git checkout pr${1}
}
# fe [FUZZY PATTERN] - Open the selected file with the default editor
# - Bypass fuzzy finder if there's only one match (--select-1)
# - Exit if there's no match (--exit-0)
fe() {
local files
IFS=$'\n' files=($(fzf-tmux --query="$1" --multi --select-1 --exit-0))
[[ -n "$files" ]] && ${EDITOR:-vim} "${files[@]}"
}
# fd - cd to selected directory
fd() {
local dir
dir=$(find ${1:-.} -path '*/\.*' -prune \
-o -type d -print 2> /dev/null | fzf +m) &&
cd "$dir"
}
# fcs - get git commit sha
# example usage: git rebase -i `fcs`
fcs() {
local commits commit
commits=$(git log --color=always --pretty=oneline --abbrev-commit --reverse) &&
commit=$(echo "$commits" | fzf --tac +s +m -e --ansi --reverse) &&
echo -n $(echo "$commit" | sed "s/ .*//")
}
# fstash - easier way to deal with stashes
# type fstash to get a list of your stashes
# enter shows you the contents of the stash
# ctrl-d shows a diff of the stash against your current HEAD
# ctrl-b checks the stash out as a branch, for easier merging
fstash() {
local out q k sha
while out=$(
git stash list --pretty="%C(yellow)%h %>(14)%Cgreen%cr %C(blue)%gs" |
fzf --ansi --no-sort --query="$q" --print-query \
--expect=ctrl-d,ctrl-b);
do
mapfile -t out <<< "$out"
q="${out[0]}"
k="${out[1]}"
sha="${out[-1]}"
sha="${sha%% *}"
[[ -z "$sha" ]] && continue
if [[ "$k" == 'ctrl-d' ]]; then
git diff $sha
elif [[ "$k" == 'ctrl-b' ]]; then
git stash branch "stash-$sha" $sha
break;
else
git stash show -p $sha
fi
done
}
[core]
# git config --global core.commentchar ;
editor = vim
[diff]
tool = kdiff3
[difftool "kdiff3"]
path = c:/Program Files/KDiff3/kdiff3.exe
#path = /Applications/kdiff3.app/Contents/MacOS/kdiff3
[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = c:/Program Files/KDiff3/kdiff3.exe
#path = /Applications/kdiff3.app/Contents/MacOS/kdiff3
keepBackup = false
trustExitCode = false
Font=Powerline Consolas
ForegroundColour=131,148,150
BackgroundColour=0,43,54
CursorColour=220,50,47
Black=7,54,66
BoldBlack=0,43,54
Red=220,50,47
BoldRed=203,75,22
Green=133,153,0
BoldGreen=88,110,117
Yellow=181,137,0
BoldYellow=101,123,131
Blue=38,139,210
BoldBlue=131,148,150
Magenta=211,54,130
BoldMagenta=108,113,196
Cyan=42,161,152
BoldCyan=147,161,161
White=238,232,213
BoldWhite=253,246,227
Transparency=low
FontHeight=12
Scrollbar=none
# curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.tmux.conf -o ~/.tmux.conf
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Change the prefix to Ctrl+a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind-key -n C-Space send-keys C-Space
# enable pretty colors
set-option -ga terminal-overrides ",xterm-256color:Tc"
# increase scroll-back history
set -g history-limit 5000
# use vim key bindings
setw -g mode-keys vi
# start window index at 1
set -g base-index 1
# start pane index at 1
set -g pane-base-index 1
# change the default delay to make it more responsive
set -sg escape-time 1
# Splitting panes
bind \\ split-window -h
bind - split-window -v
# pane movements
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# pane resizing
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# pane resizing
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# window movement
bind -r C-h select-window -t:-
bind -r C-l select-window -t:+
# remapping copy paste to vim
# unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
# bind -t vi-copy 'v' begin-selection
# bind -t vi-copy 'y' copy-selection
# setw -g monitory-activity on
set -g visual-activity on
# Enable mouse support in ~/.tmux.conf
set -g mouse on
set-option -g renumber-windows on
setw -g aggressive-resize on
# Status bar design
# status line
set -g status-justify left
set -g status-bg default
set -g status-fg colour12
set -g status-interval 2
# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
# Info on left (I don't have a session display for now)
set -g status-left ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set -g default-terminal "screen-256color"
# The modes {
setw -g clock-mode-colour colour135
# }
# The statusbar {
set -g status-position bottom
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
# }
" curl -Lk https://bit.ly/prabir-vimrc -o ~/.vimrc
" to use existing vim configuration as neovim configuration
" ln -s ~/.vimrc ~/.config/nvim/init.vim
" For windows download lua binaries from https://sourceforge.net/projects/luabinaries/files/5.3.3/Windows%20Libraries/Dynamic/lua-5.3.3_Win64_dll11_lib.zip/download
" Fro mac: brew install vim --HEAD --with-override-system-vi --with-luajit --with-python3 --with-tcl --with-gettext --enable-gui --with-client-server
set nocompatible
set encoding=utf-8
scriptencoding utf-8
set fileformats=unix,mac,dos
set termencoding=utf-8
syntax on
filetype plugin indent on
set backspace=indent,eol,start
set nobackup noswapfile
let mapleader = ' '
nnoremap ; :
" vimrc {{{
nnoremap <leader>ev :e $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>
" }}}
let s:settings = {
\ 'data_dir': expand('~/.config/nvim/data'),
\ 'plugins_dir': expand('~/.config/nvim/plugins'),
\ 'vim_plug_script_path': expand('~/.config/nvim/plug.vim'),
\ 'auto_install_plugins': 0,
\ }
let s:settings['vim_plug_script_path'] = expand('~/.config/nvim/plug.vim')
let s:settings['plugins_dir'] = expand('~/.config/nvim/plugins')
if !filereadable(s:settings['vim_plug_script_path'])
if !executable('curl') | echom 'curl required to download vim-plug' | endif
if has('win32') && &shellslash
let s:settings['vim_plug_script_path'] = substitute(s:settings['vim_plug_script_path'], '/', '\\', 'g')
endif
execute 'silent !curl -fkLo "' . s:settings['vim_plug_script_path'] . '" --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
let s:settings['auto_install_plugins'] = 1
endif
execute 'source ' . s:settings['vim_plug_script_path']
call plug#begin(s:settings['plugins_dir'])
Plug 'iCyMind/NeoSolarized'
Plug 'lifepillar/vim-solarized8'
Plug 'luochen1990/rainbow'
Plug 'thinca/vim-themis', { 'on': [] }
Plug 'sheerun/vim-polyglot'
Plug 'DataWraith/auto_mkdir'
Plug 'Lokaltog/vim-easymotion', { 'on': ['<Plug>(easymotion-s)'] }
Plug 'airblade/vim-rooter'
Plug 'cohama/lexima.vim'
Plug 'justinmk/vim-gtfo'
Plug 'lambdalisue/gina.vim'
Plug 'cohama/agit.vim', { 'on': ['Agit', 'AgitFile'] }
Plug 'mattn/emmet-vim'
Plug 'sgur/vim-editorconfig'
Plug 'tpope/vim-commentary'
Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeFind', 'NERDTreeToggle'] }
Plug 'diepm/vim-rest-console'
Plug 'mhinz/vim-grepper', { 'on': ['Grepper', '<plug>(GrepperOperator)'] }
Plug 'prabirshrestha/callbag.vim'
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'mattn/vim-lsp-settings'
Plug 'mattn/vim-lsp-icons'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'prabirshrestha/asyncomplete-file.vim'
Plug 'yami-beta/asyncomplete-omni.vim'
Plug 'prabirshrestha/asyncomplete-buffer.vim'
Plug 'Shougo/neco-syntax' | Plug 'prabirshrestha/asyncomplete-necosyntax.vim'
Plug 'Shougo/neco-vim' | Plug 'prabirshrestha/asyncomplete-necovim.vim'
Plug 'hrsh7th/vim-vsnip'
Plug 'hrsh7th/vim-vsnip-integ'
Plug 'prabirshrestha/vsnip-snippets'
Plug 'prabirshrestha/quickpick.vim'
Plug 'prabirshrestha/quickpick-colorschemes.vim'
Plug 'prabirshrestha/quickpick-filetypes.vim'
Plug 'prabirshrestha/quickpick-npm.vim'
Plug 'liuchengxu/vim-clap', { 'do': ':Clap install-binary' }
Plug 'ctrlpvim/ctrlp.vim'
Plug 'dbeecham/ctrlp-commandpalette.vim', { 'on': ['CtrlPCommandPalette'] }
Plug 'okcompute/vim-ctrlp-session'
if has('python') || has('python3') | Plug 'FelikZ/ctrlp-py-matcher' | endif
Plug 'mattn/vim-fz'
Plug 'm-pilia/vim-yggdrasil'
Plug 'mhinz/vim-lookup', { 'for': 'vim' }
Plug 'tpope/vim-markdown'
Plug 'markonm/traces.vim'
Plug 'troydm/zoomwintab.vim'
Plug 'prabirshrestha/split-term.vim', { 'branch': 'vim8', 'on': ['Term', 'VTerm', 'TTerm'] }
if has('nvim') | Plug 'equalsraf/neovim-gui-shim' | endif
call plug#end()
if s:settings['auto_install_plugins']
autocmd VimEnter * PlugClean! | PlugUpdate --sync
endif
" ui
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
if has('termguicolors') | set termguicolors | endif
set background=dark
silent! colorscheme solarized8
if has('directx') | set renderoptions=type:directx | endif
if has('gui_running') | set guioptions=Mc! | endif
if exists('g:neovide')
set guifont=Fira\ Code\ Retina:h18
else
set guifont=Fira\ Code\ Retina:h12
endif
set mouse=a " automatically enable mouse usage
set noerrorbells visualbell t_vb= " no annoying sound on errors
set shortmess+=OI
set nu " set line numbers on
set completeopt+=noinsert,noselect
set completeopt-=popup
set wildmenu " show list instead of just completing
set nowrap " Do not wrap long lines
set autoindent " Indent at the same level of the previous line
set shiftwidth=4 " Use indents of 4 spaces
set expandtab " Tabs are spaces, not tabs
set tabstop=4 " An indentation every four columns
set softtabstop=4 " Let backspace delete indent
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
set splitright " Puts new vertical split windows to the right of the current
set splitbelow " Puts new split windows to the bottom of the current
set pastetoggle=<F12> " paste toggle (sane indentation pastes)
set signcolumn=no " always disable signcoumn
set cmdheight=2
" Move up and down in autocomplete with <c-j> and <c-k>
inoremap <expr> <C-j> ("\<C-n>")
inoremap <expr> <C-k> ("\<C-p>")
" Highlight problematic whitespace
set listchars=tab:›\ ,trail:•,extends:#,nbsp:.
set showbreak=···
set incsearch " find as you type
set hlsearch " highlight search terms
set ignorecase " case in-sensitive search
set smartcase " case sensitive when upper case present
" Clear current search highlighting by fast //
nmap <silent> // :nohlsearch<CR>
set clipboard+=unnamedplus " always use system clipboard
" Visual shifting (does not exit Visual mode)
vnoremap < <gv
vnoremap > >gv
" Quit
inoremap <C-Q> <esc>:q<cr>
nnoremap <C-Q> :q<cr>
vnoremap <C-Q> <esc>
nnoremap <Leader>q :q<cr>
nnoremap <Leader>Q :qa!<cr>
nnoremap <c-s> :w<CR>
inoremap <c-s> <esc>:w<CR>i
nnoremap <silent> <leader>t2 :setl shiftwidth=2 softtabstop=2<CR>
nnoremap <silent> <leader>t4 :setl shiftwidth=4 softtabstop=4<CR>
nnoremap <silent> <leader>t8 :setl shiftwidth=8 softtabstop=8<CR>
" Insert mode:
inoremap <M-h> <Esc><c-w>h
inoremap <M-j> <Esc><c-w>j
inoremap <M-k> <Esc><c-w>k
inoremap <M-l> <Esc><c-w>l
" Visual mode:
vnoremap <M-h> <Esc><c-w>h
vnoremap <M-j> <Esc><c-w>j
vnoremap <M-k> <Esc><c-w>k
vnoremap <M-l> <Esc><c-w>l
" Normal mode:
nnoremap <M-h> <c-w>h
nnoremap <M-j> <c-w>j
nnoremap <M-k> <c-w>k
nnoremap <M-l> <c-w>l
" vim-grepper {{{
nnoremap <Leader>s :Grepper -cword -highlight<CR>
" }}}
" vim-easymotion {{{
let g:EasyMotion_keys='hklyuiopnm,qwertzxcvbasdgjf'
nmap s <Plug>(easymotion-s)
" }}}
" gina.vim {{{
if has_key(g:plugs, 'gina.vim')
let g:gina#command#blame#formatter#format = "%in %au %=on %ti"
nnoremap <leader>gb :Gina blame :<CR>
nnoremap <leader>gbr :Gina branch<CR>
nnoremap <leader>gd :Gina diff<CR>
nnoremap <leader>gl :Gina log<CR>
nnoremap <leader>gs :Gina status<CR>
nnoremap <leader>gc :Gina commit<CR>
let s:gina_cmd_opt = {'noremap': 1, 'silent': 1}
call gina#custom#mapping#nmap('blame', 'dd', '<Plug>(gina-diff-tab)')
call gina#custom#mapping#nmap('blame', 'ee', '<Plug>(gina-blame-echo)')
call gina#custom#mapping#nmap('log', 'dd', '<Plug>(gina-diff-tab)')
call gina#custom#mapping#nmap('status', '<C-]>', ':<C-U>Gina commit<CR>', s:gina_cmd_opt)
call gina#custom#mapping#nmap('/.*', 'q', ':<C-U>bd<CR>', s:gina_cmd_opt)
call gina#custom#mapping#nmap('/.*', '<C-t>', '<Plug>(gina-edit-tab)')
endif
" }}}
" ctrlp.vim and vim-fz {{{
let g:ctrlp_cache_dir = expand(s:settings['data_dir'] . '/ctrlp')
let g:ctrlp_session_path = expand(s:settings['data_dir'] . './ctrlp-sessions')
let g:ctrlp_clear_cache_on_exit = 0
if has('python') || has('python3')
let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }
endif
if executable('gof')
nmap ,f <Plug>(fz)
let g:ctrlp_map = ''
nnoremap <C-p> :call fz#run({ 'type': 'cmd', 'cmd': 'git ls-files' })<CR>
endif
nnoremap <leader>r :CtrlPMRUFiles<CR>
nnoremap <leader>qf :cclose <CR>:CtrlPQuickfix<CR>
" }}}
" asyncomplete.vim and vim-lsp {{{
" let g:lsp_log_verbose = 1
" let g:lsp_log_file = expand(s:settings['data_dir'] . '/lsp.log')
" let g:asyncomplete_log_file = expand(s:settings['data_dir'] . '/asyncomplete.log')
let g:lsp_virtual_text_enabled = 0
let g:lsp_diagnostics_echo_cursor = 1
let g:vsnip_snippet_dir = expand(s:settings['plugins_dir'] . '/vsnip-snippets/vsnips')
let g:asyncomplete_auto_popup = 1
" terminal vim treats c-@ as c-space, neovim doesn't understand c-@ so register both
if !has('nvim') && !has('gui')
imap <c-@> <Plug>(asyncomplete_force_refresh)
else
imap <c-space> <Plug>(asyncomplete_force_refresh)
endif
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
imap <expr> <Tab> pumvisible() ? "\<c-n>" : vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : "\<Tab>"
smap <expr> <Tab> pumvisible() ? "\<c-n>" : vsnip#available(1) ? '<Plug>(vsnip-expand-or-jump)' : "\<Tab>"
imap <expr> <S-Tab> pumvisible() ? "\<c-p>" : vsnip#available(1) ? '<Plug>(vsnip-jump-prev)' : "\<S-Tab>"
smap <expr> <S-Tab> pumvisible() ? "\<c-p>" : vsnip#available(1) ? '<Plug>(vsnip-jump-prev)' : "\<S-Tab>"
inoremap <expr> <CR> pumvisible() ? asyncomplete#close_popup() : "\<CR>"
inoremap <expr> <C-y> pumvisible() ? asyncomplete#close_popup() : "\<C-y>"
inoremap <expr> <C-e> pumvisible() ? asyncomplete#cancel_popup() : "\<C-e>"
autocmd! FileType rust setlocal tabstop=4 softtabstop=4
function! s:on_lsp_buffer_enabled() abort
setlocal omnifunc=lsp#complete
setlocal signcolumn=yes
nmap <buffer> gd <plug>(lsp-definition)
nmap <buffer> gD <plug>(lsp-references)
nnoremap <buffer> gs :<C-u>LspDocumentSymbol<CR>
nnoremap <buffer> gS :<C-u>LspWorkspaceSymbol<CR>
nnoremap <buffer> gQ :<C-u>LspDocumentFormat<CR>
vnoremap <buffer> gQ :LspDocumentRangeFormat<CR>
nnoremap <buffer> K :<C-u>LspHover<CR>
nnoremap <buffer> <F1> :<C-u>LspImplementation<CR>
nnoremap <buffer> <F2> :<C-u>LspRename<CR>
nnoremap <buffer> <leader>ca :LspCodeAction<CR>
xnoremap <buffer> <leader>ca :LspCodeAction<CR>
autocmd! BufWritePre *.rs call execute('LspDocumentFormatSync')
endfunction
augroup configure_lsp
au!
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
augroup END
" }}}
" vim-lookup {{{
autocmd FileType vim nnoremap <buffer><silent> <c-]> :call lookup#lookup()<cr>
autocmd FileType vim nnoremap <buffer><silent> <c-t> :call lookup#pop()<cr>
" }}}
" vim-gtfo {{{
if has('win32') | let g:gtfo#terminals = { 'win' : 'cmd /k' } | endif
"}}}
" vim-closetag {{{
" https://github.com/alvan/vim-closetag/issues/1
let g:closetag_filenames = "*.xml,*.html,*.html,*.tsx,*.config"
au FileType xml,html,xhtml,js,typescript let b:delimitMate_matchpairs = "(:),[:],{:}"
" }}}
" nerdtree {{{
nnoremap <silent> <leader>e :NERDTreeFind<CR>
nnoremap <silent> <leader>E :NERDTreeToggle<CR>
" }}}
" ctrlp-commandpalette.vim {{{
nnoremap <leader>p :CtrlPCommandPalette<cr>
let g:ctrlp_commandpalette_autoload_commands = 0
let g:commandPalette = {
\ 'Change filetype': 'Pfiletypes',
\ 'Change Colorscheme': 'Pcolorscheme',
\ 'LSP: goto definition': 'LspDefinition',
\ 'GUI Font picker': 'set guifont=*',
\ 'Current font name': 'set guifont?',
\ 'GitFiles': 'GitFiles',
\ 'Ignorecase: Toggle': 'set ignorecase!',
\ 'Sessions': 'CtrlPSession',
\ }
" }}}
if filereadable(expand('~/.vimrc.local')) | source ~/.vimrc.local | endif
" vim: set sw=2 ts=2 sts=2 et tw=78 foldmarker={{{,}}} foldmethod=marker spell:
while true; do
BAT=$(acpi | awk '{ print $4 }' | sed s/","//g)
CLK=$( date +'%a %b %d %R:%S' )
VOL=$( amixer get Master | tail -1 | awk '{ print $5}' | tr -d '[]' )
xsetroot -name "Vol: $VOL | Bat: $BAT | $CLK"
sleep 30s
done &
exec dwm
# curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.zshrc -o ~/.zshrc
# Path to your oh-my-zsh installation.
PROMPT='%~ %# '
unsetopt flow_control
# enable vi bindings
bindkey -v
bindkey -M viins 'jj' vi-cmd-mode
stty -ixon
[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh # This loads NVM
export PATH="$HOME/.cargo/bin:$HOME/go/bin:$HOME/Library/Python/3.7/bin:$PATH"
export PATH="$HOME/.config/nvim/plugins/vim-themis/bin:$PATH"
# alias
alias ls='ls -Gp'
alias vi='vim'
# git alias
alias g='git'
alias ga='git add'
alias gb='git branch'
alias gba='git branch -a'
alias gca='git commit -a'
alias gclean='git clean -xdf'
alias gcm='git checkout master'
alias gco='git checkout'
alias gcp='git cherry-pick'
alias gf='git fetch --all'
alias gl='git log --oneline --graph --decorate'
alias gm='git merge'
alias gmt='git mergetool'
alias gp='git push origin HEAD'
alias gs='git status'
alias gup='git fetch --all && git rebase'
gpr() {
git fetch origin pull/${1}/head:pr${1}
git checkout pr${1}
}
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use 'alacritty' if it is
# available, otherwise 'xterm-256color' is used.
#TERM: xterm-256color
window:
# Window dimensions (changes require restart)
#
# Specified in number of columns/lines, not pixels.
# If both are `0`, this setting is ignored.
dimensions:
columns: 80
lines: 24
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
padding:
x: 0
y: 0
# Spread additional padding evenly around the terminal content.
dynamic_padding: false
# Window decorations
#
# Available values:
# - `full`: Window with title bar and title bar buttons
# - `none`: Window without title bar, rounded corners, or drop shadow
# - `transparent`: Window with title bar with transparent background and title
# bar buttons
# - `buttonless`: Window with title bar with transparent background and no
# title bar buttons
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
# - buttonless: Title bar, transparent background and title bar buttons
# - transparent: Title bar, transparent background, but no title bar buttons
decorations: full
scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
history: 10000
# Number of lines the viewport will move for every line scrolled when
# scrollback is enabled (history > 0).
multiplier: 3
# Scroll to the bottom when new text is written to the terminal.
auto_scroll: false
# Spaces per Tab (changes require restart)
#
# This setting defines the width of a tab in cells.
#
# Some applications, like Emacs, rely on knowing about the width of a tab.
# To prevent unexpected behavior in these applications, it's also required to
# change the `it` value in terminfo when altering this setting.
tabspaces: 8
# Font configuration (changes require restart)
font:
# Normal (roman) font face
normal:
family: Fira Code
# The `style` can be specified to pick a specific face.
# style: Regular
# Bold font face
bold:
family: Fira Code
# The `style` can be specified to pick a specific face.
# style: Bold
# Italic font face
italic:
family: Fira Code
# The `style` can be specified to pick a specific face.
# style: Italic
# Point size
size: 12.0
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
offset:
x: 2
y: 2
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the right,
# increasing `y` moves the glyph upwards.
glyph_offset:
x: 0
y: 0
# Thin stroke font rendering (OS X only)
#
# Thin strokes are suitable for retina displays, but for non-retina screens
# it is recommended to set `use_thin_strokes` to `false`
#
# macOS >= 10.14.x:
#
# If the font quality on non-retina display looks bad then set
# `use_thin_strokes` to `true` and enable font smoothing by running the
# following command:
# `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
#
# This is a global setting and will require a log out or restart to take
# effect.
use_thin_strokes: true
# If `true`, bold text is drawn using the bright color variants.
draw_bold_text_with_bright_colors: true
# Colors (Solarized Dark)
colors:
# Default colors
primary:
background: '0x002b36'
foreground: '0x839496'
# Normal colors
normal:
black: '0x073642'
red: '0xdc322f'
green: '0x859900'
yellow: '0xb58900'
blue: '0x268bd2'
magenta: '0xd33682'
cyan: '0x2aa198'
white: '0xeee8d5'
# Bright colors
bright:
black: '0x002b36'
red: '0xcb4b16'
green: '0x586e75'
yellow: '0x657b83'
blue: '0x839496'
magenta: '0x6c71c4'
cyan: '0x93a1a1'
white: '0xfdf6e3'
# Visual Bell
#
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
# rung, the terminal background will be set to white and transition back to the
# default background color. You can control the rate of this transition by
# setting the `duration` property (represented in milliseconds). You can also
# configure the transition function by setting the `animation` property.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
#
# Specifying a `duration` of `0` will disable the visual bell.
visual_bell:
animation: EaseOutExpo
duration: 0
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
background_opacity: 1.0
# Mouse bindings
#
# Available fields:
# - mouse
# - action
# - mods (optional)
#
# Values for `mouse`:
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# All available `mods` and `action` values are documented in the key binding
# section.
mouse_bindings:
- { mouse: Middle, action: PasteSelection }
mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
double_click: { threshold: 300 }
triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
hide_when_typing: false
url:
# URL launcher
#
# This program is executed when clicking on a text which is recognized as a URL.
# The URL is always added to the command as the last parameter.
launcher: open
# URL modifiers
#
# These are the modifiers that need to be held down for opening URLs when clicking
# on them. The available modifiers are documented in the key binding section.
#modifiers: Control|Shift
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
# When set to `true`, selected text will be copied to the primary clipboard.
save_to_clipboard: false
cursor:
# Cursor style
#
# Values for 'style':
# - ▇ Block
# - _ Underline
# - | Beam
style: Block
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
unfocused_hollow: true
# Live config reload (changes require restart)
live_config_reload: true
# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
# Entries in `shell.args` are passed unmodified as arguments to the shell.
shell:
program: cmd
# Key bindings
#
# Key bindings are specified as a list of objects. Each binding will specify
# a key and modifiers required to trigger it, terminal modes where the binding
# is applicable, and what should be done when the key binding fires. It can
# either send a byte sequnce to the running application (`chars`), execute
# a predefined action (`action`) or fork and execute a specified command plus
# arguments (`command`).
#
# Example:
# `- { key: V, mods: Command, action: Paste }`
#
# Available fields:
# - key
# - mods (optional)
# - chars | action | command (exactly one required)
# - mode (optional)
#
# Values for `key`:
# - `A` -> `Z`
# - `F1` -> `F12`
# - `Key1` -> `Key0`
#
# A full list with available key codes can be found here:
# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number.
# This command will allow you to display the hex scancodes for certain keys:
# `showkey --scancodes`
#
# Values for `mods`:
# - Command
# - Control
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this: `mods: Control|Shift`.
# Whitespace and capitalization is relevant and must match the example.
#
# Values for `chars`:
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences.
# To find escape codes for bindings like `PageUp` ("\x1b[5~"), you can run
# the command `showkey -a` outside of tmux.
# Note that applications use terminfo to map escape sequences back to
# keys. It is therefore required to update the terminfo when
# changing an escape sequence.
#
# Values for `action`:
# - Paste
# - PasteSelection
# - Copy
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# - Hide
# - Quit
# - ClearLogNotice
#
# Values for `command`:
# The `command` field must be a map containing a `program` string and
# an `args` array of command line parameter strings.
#
# Example:
# `command: { program: "alacritty", args: ["-e", "vttest"] }`
#
# Values for `mode`:
# - ~AppCursor
# - AppCursor
# - ~AppKeypad
# - AppKeypad
key_bindings:
- { key: V, mods: Command, action: Paste }
- { key: C, mods: Command, action: Copy }
- { key: Paste, action: Paste }
- { key: Copy, action: Copy }
- { key: H, mods: Command, action: Hide }
- { key: Q, mods: Command, action: Quit }
- { key: W, mods: Command, action: Quit }
- { key: Home, chars: "\x1bOH", mode: AppCursor }
- { key: Home, chars: "\x1b[H", mode: ~AppCursor }
- { key: End, chars: "\x1bOF", mode: AppCursor }
- { key: End, chars: "\x1b[F", mode: ~AppCursor }
- { key: Key0, mods: Command, action: ResetFontSize }
- { key: Equals, mods: Command, action: IncreaseFontSize }
- { key: Minus, mods: Command, action: DecreaseFontSize }
- { key: K, mods: Command, action: ClearHistory }
- { key: K, mods: Command, chars: "\x0c" }
- { key: L, mods: Control, action: ClearLogNotice }
- { key: L, mods: Control, chars: "\x0c" }
- { key: PageUp, mods: Shift, chars: "\x1b[5;2~" }
- { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
- { key: PageUp, chars: "\x1b[5~" }
- { key: PageDown, mods: Shift, chars: "\x1b[6;2~" }
- { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
- { key: PageDown, chars: "\x1b[6~" }
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
- { key: Back, chars: "\x7f" }
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
- { key: Insert, chars: "\x1b[2~" }
- { key: Delete, chars: "\x1b[3~" }
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
- { key: Left, chars: "\x1b[D", mode: ~AppCursor }
- { key: Left, chars: "\x1bOD", mode: AppCursor }
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
- { key: Right, chars: "\x1b[C", mode: ~AppCursor }
- { key: Right, chars: "\x1bOC", mode: AppCursor }
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
- { key: Up, chars: "\x1b[A", mode: ~AppCursor }
- { key: Up, chars: "\x1bOA", mode: AppCursor }
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
- { key: Down, chars: "\x1b[B", mode: ~AppCursor }
- { key: Down, chars: "\x1bOB", mode: AppCursor }
- { key: F1, chars: "\x1bOP" }
- { key: F2, chars: "\x1bOQ" }
- { key: F3, chars: "\x1bOR" }
- { key: F4, chars: "\x1bOS" }
- { key: F5, chars: "\x1b[15~" }
- { key: F6, chars: "\x1b[17~" }
- { key: F7, chars: "\x1b[18~" }
- { key: F8, chars: "\x1b[19~" }
- { key: F9, chars: "\x1b[20~" }
- { key: F10, chars: "\x1b[21~" }
- { key: F11, chars: "\x1b[23~" }
- { key: F12, chars: "\x1b[24~" }
- { key: F1, mods: Shift, chars: "\x1b[1;2P" }
- { key: F2, mods: Shift, chars: "\x1b[1;2Q" }
- { key: F3, mods: Shift, chars: "\x1b[1;2R" }
- { key: F4, mods: Shift, chars: "\x1b[1;2S" }
- { key: F5, mods: Shift, chars: "\x1b[15;2~" }
- { key: F6, mods: Shift, chars: "\x1b[17;2~" }
- { key: F7, mods: Shift, chars: "\x1b[18;2~" }
- { key: F8, mods: Shift, chars: "\x1b[19;2~" }
- { key: F9, mods: Shift, chars: "\x1b[20;2~" }
- { key: F10, mods: Shift, chars: "\x1b[21;2~" }
- { key: F11, mods: Shift, chars: "\x1b[23;2~" }
- { key: F12, mods: Shift, chars: "\x1b[24;2~" }
- { key: F1, mods: Control, chars: "\x1b[1;5P" }
- { key: F2, mods: Control, chars: "\x1b[1;5Q" }
- { key: F3, mods: Control, chars: "\x1b[1;5R" }
- { key: F4, mods: Control, chars: "\x1b[1;5S" }
- { key: F5, mods: Control, chars: "\x1b[15;5~" }
- { key: F6, mods: Control, chars: "\x1b[17;5~" }
- { key: F7, mods: Control, chars: "\x1b[18;5~" }
- { key: F8, mods: Control, chars: "\x1b[19;5~" }
- { key: F9, mods: Control, chars: "\x1b[20;5~" }
- { key: F10, mods: Control, chars: "\x1b[21;5~" }
- { key: F11, mods: Control, chars: "\x1b[23;5~" }
- { key: F12, mods: Control, chars: "\x1b[24;5~" }
- { key: F1, mods: Alt, chars: "\x1b[1;6P" }
- { key: F2, mods: Alt, chars: "\x1b[1;6Q" }
- { key: F3, mods: Alt, chars: "\x1b[1;6R" }
- { key: F4, mods: Alt, chars: "\x1b[1;6S" }
- { key: F5, mods: Alt, chars: "\x1b[15;6~" }
- { key: F6, mods: Alt, chars: "\x1b[17;6~" }
- { key: F7, mods: Alt, chars: "\x1b[18;6~" }
- { key: F8, mods: Alt, chars: "\x1b[19;6~" }
- { key: F9, mods: Alt, chars: "\x1b[20;6~" }
- { key: F10, mods: Alt, chars: "\x1b[21;6~" }
- { key: F11, mods: Alt, chars: "\x1b[23;6~" }
- { key: F12, mods: Alt, chars: "\x1b[24;6~" }
- { key: F1, mods: Command, chars: "\x1b[1;3P" }
- { key: F2, mods: Command, chars: "\x1b[1;3Q" }
- { key: F3, mods: Command, chars: "\x1b[1;3R" }
- { key: F4, mods: Command, chars: "\x1b[1;3S" }
- { key: F5, mods: Command, chars: "\x1b[15;3~" }
- { key: F6, mods: Command, chars: "\x1b[17;3~" }
- { key: F7, mods: Command, chars: "\x1b[18;3~" }
- { key: F8, mods: Command, chars: "\x1b[19;3~" }
- { key: F9, mods: Command, chars: "\x1b[20;3~" }
- { key: F10, mods: Command, chars: "\x1b[21;3~" }
- { key: F11, mods: Command, chars: "\x1b[23;3~" }
- { key: F12, mods: Command, chars: "\x1b[24;3~" }
- { key: NumpadEnter, chars: "\n" }
apk update && apk add --no-cache \
build-base \
curl \
git \
tmux \
vim \
rust \
cargo
#!/bin/bash
# To connect to wifi:
# wifi-menu or nmtui
# To install big font:
# pacman -Sy terminus-font
# setfont ter-p32n
set -eo pipefail
trap quit:no_message INT
INSTALL_SCRIPT=install_arch.sh
EDITOR=vim
hostname=$(dialog --stdout --inputbox "Enter hostname" 0 0) || exit 1
username=$(dialog --stdout --inputbox "Enter username" 0 0) || exit 1
password=$(dialog --stdout --passwordbox "Enter password" 0 0) || exit 1
password2=$(dialog --stdout --passwordbox "Confirm password" 0 0) || exit 1
[[ "$password" == "$password2" ]] || ( echo "Passwords did not match"; exit 1; )
devicelist=$(lsblk -dplnx size -o name,size | grep -Ev "boot|rpmb|loop" | tac)
device=$(dialog --stdout --menu "Select installation disk" 0 0 0 ${devicelist}) || exit 1
device_root="${device}1"
device_boot="${device}2"
write_script() {
(
echo "#!/usr/bin/env bash"
echo "#"
echo "# Please review the install script below"
echo "#"
echo "set -euo pipefail"
echo
echo "sgdisk -Z $device"
echo "sgdisk -Z $device"
echo "sgdisk -z $device"
echo "sgdisk -o $device"
echo
echo "sgdisk -n 1:0:-200M $device"
echo "sgdisk -t 1:8300 $device"
echo
echo "sgdisk -n 2:-200M:-0 $device"
echo "sgdisk -t 2:ef00 $device"
echo "sgdisk -A 2:set:2 $device"
echo
echo "mkfs.ext4 -F $device_root"
echo "mkfs.fat -F32 $device_boot"
echo
echo "mount $device_root /mnt"
echo "mkdir -p /mnt/boot/efi"
echo "mount $device_boot /mnt/boot/efi"
echo "pacstrap /mnt base linux linux-firmware grub efibootmgr vim networkmanager"
echo
echo "cp $0 /mnt/root/"
echo
echo "genfstab -U -p /mnt > /mnt/etc/fstab"
echo
echo "ln -sf /mnt/usr/share/zoneinfo/US/Pacific /mnt/etc/localtime"
echo
echo "echo "LANG=en_US.UTF-8" > /mnt/etc/locale.conf"
echo "sed -i 's/#en_US.UTF/en_US.UTF/' /mnt/etc/locale.gen"
echo "arch-chroot /mnt locale-gen"
echo
echo "arch-chroot /mnt sh <<EOF"
echo " echo ${hostname} > /etc/hostname"
echo "EOF"
echo "arch-chroot /mnt systemctl enable NetworkManager.service"
echo
echo "arch-chroot /mnt grub-install --target=x86_64-efi --bootloader-id=grub --efi-directory=/boot/efi --recheck"
echo "arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg"
echo "mkdir -p /mnt/boot/efi/EFI/BOOT"
echo "cp /mnt/boot/efi/EFI/GRUB/grubx64.efi /mnt/boot/efi/EFI/BOOTX64.EFI"
echo
echo "# setup sudo"
echo "arch-chroot /mnt sh <<EOF"
echo " pacman -Syu --noconfirm sudo"
echo " echo '%wheel ALL=(ALL) ALL' | sudo EDITOR='tee -a' visudo"
echo "EOF"
echo
echo "# create user"
echo "arch-chroot /mnt sh <<EOF"
echo " useradd -Nm -g users -G wheel,sys \"$username\""
echo " echo -e "$password"\"\\n\"$password | passwd \"$username\""
echo "EOF"
echo
echo "# disallow root login"
echo "arch-chroot /mnt passwd -l root"
) > "$INSTALL_SCRIPT"
chmod +x "$INSTALL_SCRIPT"
}
write_script
# open editor to review and make last changes to the script
"$EDITOR" "$INSTALL_SCRIPT"
reset
clear
dialog --title "Arch Installer" --yesno "Are you sure you want to run the script?" 7 60
response=$?
clear
case $response in
0) bash "$INSTALL_SCRIPT";;
1) clear && echo "Cancelling installation";;
255) clear && echo "Cancelling installation";;
esac
#!/bin/zsh
# curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/babun-post-install | zsh
successfully() {
$* || (echo "\nfailed" 1>&2 && exit 1)
}
fancy_echo() {
echo "\n$1"
}
fancy_echo "Updating babun"
successfully pact update
fancy_echo "Updating ~/.zshrc"
successfully curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.zshrc -o ~/.zshrc
fancy_echo "Installing tmux"
successfully pact install tmux
fancy_echo "Installing solarized dark theme and powerconsolas for mintty"
successfully curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.minttyrc -o ~/.minttyrc
fancy_echo "Installing the_silver_searcher (ag)"
successfully pact install automake pkg-config libpcre-devel liblzma-devel
successfully git clone https://github.com/ggreer/the_silver_searcher ~/ag
successfully pushd ~/ag
successfully bash -x -o igncr ./build.sh && make install
successfully cd ..
successfully rm -rf ~/ag
successfully popd
fanyc_echo "Updating gitconfig"
successfully git config --global core.autocrlf true
successfully git config --global user.name "prabirshrestha"
successfully git config --global user.email "mail@prabir.me"
echo "execute 'chere -i -t mintty' in admin mode to enable Zsh Prompt Here"
source ~/.zshrc
START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/boxstart.ps1
Set-ExplorerOptions -showFileExtensions
Disable-BingSearch
Enable-RemoteDesktop
Enable-MicrosoftUpdate
cinst curl
cinst googlechrome
cinst visualstudiocode
cinst googledrive
cinst python
cinst python2
cinst wget
cinst nuget.commandline
cinst procexp
cinst paint.net
cinst fiddler4
cinst mingw
cinst webpicmd
cinst webpi
cinst cmake
cinst redis-64
cinst imagemagick
cinst cpu-z
cinst kdiff3
cinst dotpeek
cinst gpg4win
cinst nugetpackageexplorer
cinst f.lux
cinst linqpad
cinst sourcecodepro
cinst rabbitmq
cinst ansicon
cinst windbg
cinst sudo
cinst clink
cinst ctags
cinst jq
cinst ack
cinst dependencywalker
cinst postgresql
cinst pgadmin3
cinst zoomit
brew install vim --with-lua
brew install fzf node ripgrep tmux
rmdir /s /q vim80
powershell -NoProfile -ExecutionPolicy Bypass -Command "(new-object System.Net.WebClient).DownloadFile('http://tuxproject.de/projects/vim/complete-x64.7z', 'complete-x64.7z')"
"%ProgramFiles%\7-Zip\7z.exe" x complete-x64.7z -ovim80
del complete-x64.7z
pause
font_size=18
color_scheme="Builtin Solarized Dark"
default_prog=["/bin/bash", "--login", "-i"]
[[font.font]]
family="Fira Code"
scrollback_lines=9999
[window_padding]
left=0
right=0
top=0
bottom=0
@prabirshrestha
Copy link
Author

powerline consolas can be downloaded from https://github.com/eugeneching/consolas-powerline-vim

@schodge
Copy link

schodge commented Nov 26, 2014

Did you have any trouble getting mintty to display the patched fonts correctly? They still show up for me as question marks and not the correct glyph. Thanks.

@prabirshrestha
Copy link
Author

@schodge I now don't use cygwin's mingw. Use the windows x64 gvim only so the .vimrc file might not work with cygwin. When I did use cyginw I didn't see any problems with it.

@pgrm
Copy link

pgrm commented Mar 28, 2015

I see that you enabled the jump plugin in zsh. Does it mean you can jump around with j just by enabling it, or did you need to install something additionally?

@Grafikart
Copy link

Did you figured out how to make tmux open split in the current directory ? Everytime I create a new pane it goes to my home directory :(

@thatkookooguy
Copy link

thatkookooguy commented May 29, 2016

I get the following errors when installing this. Any idea what's wrong? maybe I need to install some extra things before this?

config.status: executing depfiles commands
+ make -j4
  CC       src/ignore.o
  CC       src/log.o
  CC       src/options.o
  CC       src/print.o
src/ignore.c: In function ‘add_ignore_pattern’:
src/ignore.c:106:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         if (!isspace(pattern[pattern_len - 1])) {
         ^
  CC       src/print_w32.o
  CC       src/scandir.o
  CC       src/search.o
  CC       src/lang.o
  CC       src/util.o
  CC       src/decompress.o
  CC       src/main.o
src/util.c: In function ‘generate_alpha_skip’:
src/util.c:80:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             skip_lookup[(unsigned char)tolower(find[i])] = f_len - i;
             ^
src/util.c:81:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             skip_lookup[(unsigned char)toupper(find[i])] = f_len - i;
             ^
src/util.c: In function ‘is_prefix’:
src/util.c:95:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             if (tolower(s[i]) != tolower(s[i + pos])) {
             ^
src/util.c:95:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
src/util.c: In function ‘suffix_len’:
src/util.c:113:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             if (tolower(s[pos - i]) != tolower(s[s_len - i - 1])) {
             ^
src/util.c:113:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
src/util.c: In function ‘boyer_moore_strncasestr’:
src/util.c:176:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         for (i = f_len - 1; i >= 0 && tolower(s[pos]) == find[i]; pos--, i--) {
         ^
src/util.c: In function ‘is_lowercase’:
src/util.c:416:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         if (!isascii(s[i]) || isupper(s[i])) {
         ^
src/decompress.c: In function ‘decompress_zlib’:
src/decompress.c:52:22: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
     stream.next_in = (Bytef *)buf;
                      ^
src/main.c: In function ‘main’:
src/main.c:112:17: warning: array subscript has type ‘char’ [-Wchar-subscripts]
                 *c = (char)tolower(*c);
                 ^
  CCLD     ag.exe
make[1]: Entering directory '/home/Neil/ag'
 /usr/bin/mkdir -p '/usr/local/bin'
  /usr/bin/install -c ag.exe '/usr/local/bin'
 /usr/bin/mkdir -p '/usr/local/share/the_silver_searcher/completions'
 /usr/bin/install -c -m 644 ag.bashcomp.sh '/usr/local/share/the_silver_searcher/completions'
 /usr/bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 doc/ag.1 '/usr/local/share/man/man1'
make[1]: Leaving directory '/home/Neil/ag'
zsh: command not found: fanyc_echo
execute 'chere -i -t mintty' in admin mode to enable Zsh Prompt Here
ERROR: z.sh is meant to be sourced, not directly executed.
stty: standard input: Inappropriate ioctl for device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment