diff options
| author | Marc Vertes <mvertes@free.fr> | 2021-11-27 11:04:34 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2021-11-27 11:04:34 +0100 |
| commit | 7a36b02b5f3ae6560030c97513b8c15d9abd16d8 (patch) | |
| tree | 5c3a68031aecfab106f50a547f6ba2abaaef4928 | |
| parent | e27491fbca20c2ecd76fcd84bd7007a546da5a75 (diff) | |
update
| -rw-r--r-- | .bashrc | 11 | ||||
| -rw-r--r-- | .profile | 3 | ||||
| -rw-r--r-- | .vimrc | 3 | ||||
| -rwxr-xr-x | bin/update_hosts | 6 |
4 files changed, 16 insertions, 7 deletions
@@ -45,8 +45,8 @@ export TERMINAL=xt #alias ls='ls --color=auto -v' alias ls='ls -GF' alias ll='ls -AlGFhv' -alias vi='vim' -alias view='vim -R' +alias vi='nvim' +alias view='nvim -R' alias ldd='otool -L' alias ibrew='arch -x86_64 /usr/local/bin/brew' #alias op='xdg-open' @@ -59,6 +59,7 @@ alias ibrew='arch -x86_64 /usr/local/bin/brew' alias gob='go build' alias goh='p go help' alias god='p go doc' +alias gol='GO111MODULE=off go' alias gtr='go test -v -run' alias gtb='go test -v -cpuprofile cpu.out -memprofile mem.out -benchmem -bench' alias rvi='sudo vim' @@ -143,3 +144,9 @@ meteo() { # load Nix config files (aka auto-completion etc.) #export XDG_DATA_DIRS="$HOME/.nix-profile/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + +PATH="/Users/marc/perl5/bin${PATH:+:${PATH}}"; export PATH; +PERL5LIB="/Users/marc/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; +PERL_LOCAL_LIB_ROOT="/Users/marc/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; +PERL_MB_OPT="--install_base \"/Users/marc/perl5\""; export PERL_MB_OPT; +PERL_MM_OPT="INSTALL_BASE=/Users/marc/perl5"; export PERL_MM_OPT; @@ -1,6 +1,6 @@ # ~/.profile -PATH=~/bin:/opt/homebrew/bin:$PATH:~/go/bin:~/.cargo/bin +PATH=~/bin:/opt/homebrew/bin:/opt/homebrew/opt/ruby/bin:$PATH:~/go/bin:~/.cargo/bin if [ -z "$SSH_AUTH_SOCK" ] ; then eval `ssh-agent -s` @@ -15,3 +15,4 @@ fi #esac . "/opt/homebrew/etc/profile.d/bash_completion.sh" +eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)" @@ -25,7 +25,7 @@ let g:go_list_type = "quickfix" let g:go_fmt_command = "gopls" let g:go_gopls_gofumpt = 1 let g:go_metalinter_command = "golangci-lint" -"autocmd FileType go syntax on +autocmd FileType go syntax on autocmd FileType go nmap <leader>b <Plug>(go-build) autocmd FileType go nmap <leader>i <Plug>(go-info) autocmd FileType go nmap <leader>r <Plug>(go-run) @@ -79,3 +79,4 @@ noremap <leader>n :bn<cr> noremap <leader><leader> :bd<cr> noremap <leader>o :!open <cWORD>&<cr><cr> noremap <C-g> :tag <c-r><c-w><cr> +noremap <C-p> :Files<cr> diff --git a/bin/update_hosts b/bin/update_hosts index 8550ec3..40ec470 100755 --- a/bin/update_hosts +++ b/bin/update_hosts @@ -5,11 +5,11 @@ [ "$USER" = root ] || exec sudo "$0" "$@" -echo "Checking from https://github.com/StevenBlack/hosts:" -lsd=$(curl -s "https://api.github.com/repos/StevenBlack/hosts/commits?path=hosts&page=1&per_page=1"| jq -r '.[0].commit.committer.date') +echo 'Checking from https://github.com/StevenBlack/hosts:' +lsd=$(curl -s 'https://api.github.com/repos/StevenBlack/hosts/commits?path=hosts&page=1&per_page=1' | jq -r '.[0].commit.committer.date') echo "last source update: $(date -j -f "%FT%TZ" "$lsd")" echo "last local update: $(date -r /etc/hosts)" -[ $(date -j -f "%FT%TZ" "$lsd" +%s) -lt $(date -r /etc/hosts +%s) ] && echo "Nothing to do" && exit +[ $(date -j -f "%FT%TZ" "$lsd" +%s) -lt $(date -r /etc/hosts +%s) ] && echo 'Nothing to do' && exit cd /etc cp -p hosts hosts.old |
