dot/.config/aliasrc/programs

50 lines
1,014 B
Text
Raw Normal View History

2023-07-22 14:46:26 +02:00
# just for security and for fun because i have typing -rf every time
alias cp='cp -v'
alias mv='mv -v'
alias rm='rm -v'
2024-02-20 15:49:52 +01:00
alias ff='fasttyper'
2023-07-22 14:46:26 +02:00
2024-02-20 15:49:52 +01:00
# exit
2023-07-22 14:46:26 +02:00
alias e='exit'
2024-02-20 15:49:52 +01:00
# program shortcuts
2023-07-22 14:46:26 +02:00
alias grep='grep --color=auto'
2024-02-20 15:49:52 +01:00
# ls
2024-07-25 20:09:29 +02:00
if type eza &>/dev/null; then
alias ls='eza --icons -g'
lst() { eza --no-icons --sort=time | head --lines=1; }
2024-07-15 12:22:57 +02:00
fi
2023-07-22 14:46:26 +02:00
alias ll='ls -lh'
alias lls='ls -lhrs modified'
alias la='ls -a'
alias lla='ls -lha'
alias l='ls'
2024-02-20 15:49:52 +01:00
# python
2023-07-22 14:46:26 +02:00
alias py='python3'
alias py3='python3'
alias pip='python3 -m pip'
alias ipy='ipython --TerminalInteractiveShell.editing_mode=vi --TerminalInteractiveShell.timeoutlen=0.2'
2024-02-20 15:49:52 +01:00
# vim
2024-07-15 20:58:29 +02:00
if type nvim &>/dev/null; then
2024-07-15 12:22:57 +02:00
alias vim='nvim'
fi
2023-07-22 14:46:26 +02:00
alias v='vim'
alias vv='vifm'
2024-02-20 15:49:52 +01:00
# kitty
2023-07-22 14:46:26 +02:00
if [ "$TERM" = "xterm-kitty" ]; then
alias kssh='kitty +kitten ssh'
fi
2024-02-20 15:49:52 +01:00
# copy piped to clipboard
cpy() { py -c "import sys, pyperclip; pyperclip.copy(sys.stdin.read().strip())"; }
# history
2023-07-22 14:46:26 +02:00
hlst() { history | tail --lines=1 | cut -d " " -f 4-; }
lstc() { lst | cpy; }
hlstc() { hlst | cpy; }