diff --git a/dot_config/bash/bashrc.d/aliases.sh b/dot_config/bash/bashrc.d/aliases.sh new file mode 100644 index 0000000..12c7e82 --- /dev/null +++ b/dot_config/bash/bashrc.d/aliases.sh @@ -0,0 +1,6 @@ +alias 644='chmod 644' +alias 755='chmod 755' +alias 600='chmod 600' +alias 700='chmod 700' +alias +x='chmod +x' +# vim: filetype=sh diff --git a/dot_config/bash/bashrc.d/aliases.sh.tmpl b/dot_config/bash/bashrc.d/aliases.sh.tmpl deleted file mode 100644 index 259924a..0000000 --- a/dot_config/bash/bashrc.d/aliases.sh.tmpl +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -alias ll='ls -alF' -alias curl='curl --proto-default https --silent ' -alias to_lower="tr '[:upper:]' '[:lower:]'" -alias to_upper="tr '[:lower:]' '[:upper:]'" - -alias 644='chmod 644' -alias 755='chmod 755' -alias 600='chmod 600' -alias 700='chmod 700' -alias +x='chmod +x' - -alias rsync-win='rsync --recursive --verbose --times --modify-window=1 ' -alias simple-http-server='python3 -m http.server' -alias wget-opendir='wget --recursive --level 0 --continue --no-clobber \ - --no-parent --execute robots=off --random-wait --limit-rate=800k \ - --reject=html,htm,index' - -alias numfiles='find . -maxdepth 1 -type f | wc -l' -alias take='sudo chown $(whoami):$(whoami) ' - -{{ if and (lookPath "jq") (lookPath "prettier") (lookPath "bat") -}} -alias pretty_json='jq --compact-output | prettier --parser json | bat --language json' -{{- end }} - -{{ if eq .chezmoi.os "linux" -}} -alias ls='ls --color=auto' -alias grep='grep --color=auto' -alias fgrep='fgrep --color=auto' -alias egrep='egrep --color=auto' -{{- end }} - -{{ if lookPath "bat" -}} -alias batdiff='batdiff --pager=""' -alias cat=bat -{{- end }} - -# vim: filetype=bash diff --git a/dot_config/profile/profile.d/alias.sh.tmpl b/dot_config/profile/profile.d/alias.sh.tmpl index e35eb63..23776f3 100644 --- a/dot_config/profile/profile.d/alias.sh.tmpl +++ b/dot_config/profile/profile.d/alias.sh.tmpl @@ -1,8 +1,38 @@ -alias node_lts="curl --silent https://nodejs.org/dist/index.tab | cut -f 1,10 | grep -v '-' | head -n 2 | tail -n 1 | cut -f 1" -alias node_current="curl --silent https://nodejs.org/dist/index.tab | cut -f 1,10 | grep '-' | head -n 1 | cut -f 1" +alias ll='ls -alF' +alias curl='curl --proto-default https --silent ' +alias to_lower="tr '[:upper:]' '[:lower:]'" +alias to_upper="tr '[:lower:]' '[:upper:]'" {{ if lookPath "nvim" -}} alias vim=nvim {{- end }} +alias node_lts="curl --silent https://nodejs.org/dist/index.tab | cut -f 1,10 | grep -v '-' | head -n 2 | tail -n 1 | cut -f 1" +alias node_current="curl --silent https://nodejs.org/dist/index.tab | cut -f 1,10 | grep '-' | head -n 1 | cut -f 1" + +alias rsync-win='rsync --recursive --verbose --times --modify-window=1 ' +alias simple-http-server='python3 -m http.server' +alias wget-opendir='wget --recursive --level 0 --continue --no-clobber \ + --no-parent --execute robots=off --random-wait --limit-rate=800k \ + --reject=html,htm,index' + +alias numfiles='find . -maxdepth 1 -type f | wc -l' +alias take='sudo chown $(whoami):$(whoami) ' + +{{ if and (lookPath "jq") (lookPath "prettier") (lookPath "bat") -}} +alias pretty_json='jq --compact-output | prettier --parser json | bat --language json' +{{- end }} + +{{ if eq .chezmoi.os "linux" -}} +alias ls='ls --color=auto' +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' +{{- end }} + +{{ if lookPath "bat" -}} +alias batdiff='batdiff --pager=""' +alias cat=bat +{{- end }} + # vim: filetype=sh