From f3c728528118b5cdb9d3e8acdb20fa22101763f8 Mon Sep 17 00:00:00 2001 From: lainiwa Date: Thu, 13 Jul 2023 18:47:53 +0400 Subject: [PATCH] Upd aliases --- config/zsh/aliases.zsh | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/config/zsh/aliases.zsh b/config/zsh/aliases.zsh index da08590..933c293 100755 --- a/config/zsh/aliases.zsh +++ b/config/zsh/aliases.zsh @@ -80,6 +80,8 @@ alias t='tmux attach || tmux' alias fix='reset; stty sane; tput rs1; clear; echo -e "\033c"' # Enter temporary directory alias tmp='cd $(mktemp -d)' +# Rustfmt +alias rustfmt='rustfmt --edition=2021' # Systemd --user aliases alias sys='systemctl' @@ -123,19 +125,29 @@ alias -g NUL='&> /dev/null' # Head and shoulders alias -g H='| head' +alias -g HH='|& head' alias -g T='| tail' +alias -g TT='|& tail' # Per-line tools alias -g G='| grep --ignore-case' +alias -g GG='|& grep --ignore-case' alias -g GE='| grep --ignore-case -E' +alias -g GGE='|& grep --ignore-case -E' alias -g GV='| grep --ignore-case --invert-match' # negative grep +alias -g GGV='|& grep --ignore-case --invert-match' # negative grep alias -g GVE='| grep --ignore-case --invert-match -E' # negative grep +alias -g GGVE='|& grep --ignore-case --invert-match -E' # negative grep alias -g S='| sed' +alias -g SS='|& sed' # Redirect to less alias -g L='| less' +alias -g LL='|& less' alias -g LR='| less --raw-control-chars' # colors support +alias -g LLR='|& less --raw-control-chars' # colors support alias -g LS='| less --chop-long-lines' # don't wrap long lines +alias -g LLS='|& less --chop-long-lines' # don't wrap long lines # Split to columns alias -g COL='| column -t' @@ -176,7 +188,7 @@ unset grc_conf # I'm not a robot alias du='du -h' -alias df='df -h' +alias df='df -Th' alias free='free --human' @@ -206,6 +218,9 @@ fi alias -s json='jq <' alias -s {cs,ts,html}=${EDITOR} +# Serve single a html file +# { echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c