693 lines
13 KiB
YAML
693 lines
13 KiB
YAML
%YAML 1.1
|
|
---
|
|
tags:
|
|
- name: fun
|
|
description: >-
|
|
Aliases of questionable usefulness, mostly for puns, private jokes,
|
|
or showing off.
|
|
- name: git
|
|
description: Git-related shortcuts.
|
|
- name: docker
|
|
description: Docker-related shortcuts.
|
|
- name: python
|
|
description: Python-related shortcuts.
|
|
- name: basic
|
|
description: >-
|
|
Rather basic aliases that you might already have built into your shell.
|
|
- name: specific
|
|
description: Aliases that are quite specific to my own setup.
|
|
|
|
aliases:
|
|
- name: aliasless
|
|
description: In honour of ~aliasless!
|
|
value: 'alias | less'
|
|
tag: fun
|
|
|
|
- name: please
|
|
description: For when you want to be polite with your terminal.
|
|
value: sudo
|
|
tag: fun
|
|
|
|
- name: ':q'
|
|
description: For when I get confused between Vim and a shell.
|
|
value: exit
|
|
tag: fun
|
|
|
|
- name: ':q!'
|
|
value: exit
|
|
tag: fun
|
|
|
|
- name: ':wq'
|
|
value: exit
|
|
tag: fun
|
|
|
|
- name: gs
|
|
value: git status
|
|
tag: git
|
|
|
|
- name: gch
|
|
value: git checkout
|
|
tag: git
|
|
|
|
- name: gchm
|
|
value: git checkout master
|
|
tag: git
|
|
|
|
- name: gchb
|
|
value: git checkout -b
|
|
tag: git
|
|
|
|
- name: gl
|
|
description: >-
|
|
Yet another git log alias.
|
|
You will probably want to customize it with your own format.
|
|
value: >-
|
|
git log
|
|
--graph
|
|
--pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s
|
|
%Cgreen(%cr) %C(bold blue)<%an>%Creset'
|
|
--abbrev-commit
|
|
--all
|
|
tag: git
|
|
|
|
- name: ga
|
|
value: git add
|
|
tag: git
|
|
|
|
- name: gaa
|
|
value: git add -A
|
|
tag: git
|
|
|
|
- name: gapa
|
|
value: git add --patch
|
|
tag: git
|
|
|
|
- name: gb
|
|
value: git branch
|
|
tag: git
|
|
|
|
- name: gbd
|
|
value: git branch -d
|
|
tag: git
|
|
|
|
- name: gbD
|
|
value: git branch -D
|
|
tag: git
|
|
|
|
- name: gbs
|
|
value: git bisect
|
|
tag: git
|
|
|
|
- name: gbs!
|
|
value: git bisect start
|
|
tag: git
|
|
|
|
- name: gbsg
|
|
value: git bisect good
|
|
tag: git
|
|
|
|
- name: gbsb
|
|
value: git bisect bad
|
|
tag: git
|
|
|
|
- name: gbss
|
|
value: git bisect skip
|
|
tag: git
|
|
|
|
- name: gbsr
|
|
value: git bisect reset
|
|
tag: git
|
|
|
|
|
|
- name: gc
|
|
value: git commit
|
|
tag: git
|
|
|
|
- name: gca
|
|
value: git commit -a
|
|
tag: git
|
|
|
|
- name: gcas
|
|
value: git commit -a -s
|
|
tag: git
|
|
|
|
- name: gcm
|
|
value: git commit -m
|
|
tag: git
|
|
|
|
- name: gcms
|
|
value: git commit -s -m
|
|
tag: git
|
|
|
|
- name: gcs
|
|
value: git commit -s
|
|
tag: git
|
|
|
|
- name: gcam
|
|
value: git commit -a -m
|
|
tag: git
|
|
|
|
- name: gcams
|
|
value: git commit -a -s -m
|
|
tag: git
|
|
|
|
- name: gcan
|
|
value: git commit --amend --no-edit
|
|
tag: git
|
|
|
|
- name: gcans
|
|
value: git commit --amend -s --no-edit
|
|
tag: git
|
|
|
|
- name: gcaan
|
|
value: git commit --amend -a --no-edit
|
|
tag: git
|
|
|
|
- name: gcaans
|
|
value: git commit --amend -a -s --no-edit
|
|
tag: git
|
|
|
|
- name: gcp
|
|
value: git cherry-pick
|
|
tag: git
|
|
|
|
- name: gcpa
|
|
value: git cherry-pick --abort
|
|
tag: git
|
|
|
|
- name: gcpc
|
|
value: git cherry-pick --continue
|
|
tag: git
|
|
|
|
- name: gd
|
|
value: git diff
|
|
tag: git
|
|
|
|
- name: gds
|
|
value: git diff --staged
|
|
tag: git
|
|
|
|
- name: gf
|
|
value: git fetch
|
|
tag: git
|
|
|
|
- name: gfp
|
|
value: git fetch --prune
|
|
tag: git
|
|
|
|
- name: gg
|
|
description: For when you give up with command-line Git.
|
|
value: git gui
|
|
tag: git
|
|
|
|
- name: gm
|
|
value: git merge
|
|
tag: git
|
|
|
|
- name: gma
|
|
value: git merge --abort
|
|
tag: git
|
|
|
|
- name: gp
|
|
value: git push
|
|
tag: git
|
|
|
|
- name: gpf
|
|
value: git push --force-with-lease
|
|
tag: git
|
|
|
|
- name: gpfo
|
|
value: git push --force-with-lease origin
|
|
tag: git
|
|
|
|
- name: gpu
|
|
value: git push -u origin
|
|
tag: git
|
|
|
|
- name: gr
|
|
value: git remote
|
|
tag: git
|
|
|
|
- name: gra
|
|
value: git remote add
|
|
tag: git
|
|
|
|
- name: grrm
|
|
value: git remote remove
|
|
tag: git
|
|
|
|
- name: grmv
|
|
value: git remote rename
|
|
tag: git
|
|
|
|
- name: grpo
|
|
value: git remote prune origin
|
|
tag: git
|
|
|
|
- name: grb
|
|
value: git rebase
|
|
tag: git
|
|
|
|
- name: grba
|
|
value: git rebase --abort
|
|
tag: git
|
|
|
|
- name: grbc
|
|
value: git rebase --continue
|
|
tag: git
|
|
|
|
- name: grbi
|
|
value: git rebase -i
|
|
tag: git
|
|
|
|
- name: grbm
|
|
value: git rebase master
|
|
tag: git
|
|
|
|
- name: grbs
|
|
value: git rebase --skip
|
|
tag: git
|
|
|
|
- name: grh
|
|
value: git reset
|
|
tag: git
|
|
|
|
- name: grhh
|
|
value: git reset --hard
|
|
tag: git
|
|
|
|
- name: grl
|
|
value: git reflog
|
|
tag: git
|
|
|
|
- name: gst
|
|
value: git stash
|
|
tag: git
|
|
|
|
- name: gsta
|
|
value: git stash push
|
|
tag: git
|
|
|
|
- name: gstam
|
|
value: git stash push -m
|
|
tag: git
|
|
|
|
- name: gstd
|
|
value: git stash clear
|
|
tag: git
|
|
|
|
- name: gstl
|
|
value: git stash list
|
|
tag: git
|
|
|
|
- name: gstp
|
|
value: git stash pop
|
|
tag: git
|
|
|
|
- name: gsts
|
|
value: git stash show --text
|
|
tag: git
|
|
|
|
- name: gt
|
|
value: git tag
|
|
tag: git
|
|
|
|
- name: gtf
|
|
value: git tag -f
|
|
tag: git
|
|
|
|
- name: gtd
|
|
value: git tag -d
|
|
tag: git
|
|
|
|
- name: hd
|
|
value: hexdump -C
|
|
tag: basic
|
|
|
|
- name: https
|
|
description: An alias for HTTPie to use HTTPS more quickly
|
|
value: http --default-scheme=https
|
|
|
|
- name: ka
|
|
value: killall
|
|
tag: basic
|
|
|
|
- name: nuke
|
|
value: kill -9
|
|
tag: fun
|
|
|
|
- name: l
|
|
value: ls -lah
|
|
tag: basic
|
|
|
|
- name: la
|
|
value: ls -lAh
|
|
tag: basic
|
|
|
|
- name: ll
|
|
value: ls -lh
|
|
tag: basic
|
|
|
|
- name: md
|
|
value: mkdir
|
|
tag: basic
|
|
|
|
- name: rd
|
|
value: rmdir
|
|
tag: basic
|
|
|
|
- name: mdp
|
|
value: mkdir -p
|
|
tag: basic
|
|
|
|
- name: chown
|
|
description: Why isn't this the default?!
|
|
value: chown --preserve-root
|
|
tag: basic
|
|
|
|
- name: chmod
|
|
description: Why isn't this the default?!
|
|
value: chmod --preserve-root
|
|
tag: basic
|
|
|
|
- name: oneplus
|
|
description: >-
|
|
I have KDEConnect installed on my OnePlus One,
|
|
and I often use its not-so-comfortable CLI.
|
|
value: "kdeconnect-cli -n 'OnePlus One'"
|
|
tag: specific
|
|
|
|
- name: nuketheswap
|
|
description: |-
|
|
Named after a private joke at work. Cleans up your swap.
|
|
|
|
Be careful not to run this if you do not have enough space in RAM or if
|
|
you still have some programs eating up your RAM: this could freeze
|
|
your machine.
|
|
value: sudo swapoff -a; sudo swapon -a
|
|
tag: specific
|
|
|
|
- name: scream
|
|
value: "tr '[[:lower:]]' '[[:upper:]]'"
|
|
tag: fun
|
|
|
|
- name: whisper
|
|
value: "tr '[[:upper:]]' '[[:lower:]]'"
|
|
tag: fun
|
|
|
|
- name: cowscream
|
|
description: For the big moo-ds.
|
|
value: "figlet -f big -w 999999 | cowsay -nw"
|
|
tag: fun
|
|
|
|
- name: cowanxiety
|
|
description: For the big bad moo-ds.
|
|
value: "figlet -f big -w 999999 | cowthink -nw"
|
|
tag: fun
|
|
|
|
- name: sl
|
|
description: I like trains, but not too much.
|
|
value: sl -e
|
|
tag: fun
|
|
|
|
- name: fullwidth
|
|
description: >-
|
|
Convert normal character to their full-width equivalents.
|
|
Great for vaporware-style text, or for messing up some terminals.
|
|
value: "sed \"y/!\\\"#\\$%&'()*+,-.\\/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\\\]^_\\`abcdefghijklmnopqrstuvwxyz{|}~¢£¬¯¦¥ /!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¢£¬ ̄¦¥ /\""
|
|
tag: fun
|
|
|
|
- name: dco
|
|
value: docker-compose
|
|
tag: docker
|
|
|
|
- name: dcp
|
|
value: docker container prune
|
|
tag: docker
|
|
|
|
- name: dccp
|
|
value: docker container cp
|
|
tag: docker
|
|
|
|
- name: dcpf
|
|
value: docker container prune -f
|
|
tag: docker
|
|
|
|
- name: de
|
|
value: docker exec
|
|
tag: docker
|
|
|
|
- name: dei
|
|
value: docker exec -it
|
|
tag: docker
|
|
|
|
- name: di
|
|
value: docker inspect
|
|
tag: docker
|
|
|
|
- name: dip
|
|
value: docker image prune
|
|
tag: docker
|
|
|
|
- name: dipf
|
|
value: docker image prune -f
|
|
tag: docker
|
|
|
|
- name: drmi
|
|
value: docker rmi
|
|
tag: docker
|
|
|
|
- name: drmia
|
|
value: docker images -q | xargs docker rmi
|
|
tag: docker
|
|
|
|
- name: dk
|
|
value: docker kill
|
|
tag: docker
|
|
|
|
- name: dka
|
|
value: docker ps -q | xargs docker kill
|
|
tag: docker
|
|
|
|
- name: dl
|
|
value: docker logs
|
|
tag: docker
|
|
|
|
- name: dlf
|
|
value: docker logs -f
|
|
tag: docker
|
|
|
|
- name: dlft
|
|
value: docker logs -f --tail
|
|
tag: docker
|
|
|
|
- name: dlt
|
|
value: docker logs --tail
|
|
tag: docker
|
|
|
|
- name: dn
|
|
value: docker network
|
|
tag: docker
|
|
|
|
- name: dnc
|
|
value: docker network create
|
|
tag: docker
|
|
|
|
- name: dnp
|
|
value: docker network prune
|
|
tag: docker
|
|
|
|
- name: dnpf
|
|
value: docker network prune -f
|
|
tag: docker
|
|
|
|
- name: dp
|
|
value: docker ps
|
|
tag: docker
|
|
|
|
- name: dpq
|
|
value: docker ps -q
|
|
tag: docker
|
|
|
|
- name: dr
|
|
value: docker run
|
|
tag: docker
|
|
|
|
- name: dri
|
|
value: docker run -it
|
|
tag: docker
|
|
|
|
- name: dsp
|
|
value: docker system prune
|
|
tag: docker
|
|
|
|
- name: dspf
|
|
value: docker system prune -f
|
|
tag: docker
|
|
|
|
- name: gut
|
|
description: >-
|
|
You can also have a function that looks for 'status' in the argument,
|
|
and prints 'hungry' for `gut status`.
|
|
value: git
|
|
tag: git
|
|
|
|
- name: got
|
|
description: For when you type your aliases so fast you miss a key.
|
|
value: git
|
|
tag: git
|
|
|
|
- name: cdp
|
|
value: cdproject
|
|
tag: python
|
|
|
|
- name: wk
|
|
value: workon
|
|
tag: python
|
|
|
|
- name: sqlite
|
|
value: sqlite3
|
|
|
|
- name: ssh
|
|
description: >-
|
|
Used in my Termux setup because the ssh-agent compatible ssh is ssha.
|
|
value: ssha
|
|
tag: specific
|
|
hosts:
|
|
- termux
|
|
|
|
- name: shutdown
|
|
value: exit
|
|
description: |-
|
|
As an i3 user, the easiest way for me to shut the computer down is to
|
|
use `shutdown now`. I can use i3's launcher to do that, or I can just
|
|
run that in any terminal that I already have opened. As I often leave an
|
|
SSH connection to tilde.town opened for a while when my home computer is
|
|
running, sometimes I accidentally try to shut the town down!
|
|
|
|
Luckily, it does not let me do that because there are other users
|
|
logged on, but I set an alias just to avoid the little scare I can
|
|
get from that.
|
|
tag: specific
|
|
hosts:
|
|
- tildetown
|
|
|
|
- name: joke
|
|
type: git
|
|
value: '!curl -s https://raw.githubusercontent.com/EugeneKay/git-jokes/lulz/Jokes.txt | shuf | head -n1'
|
|
tag: fun
|
|
|
|
- name: coffee
|
|
type: git
|
|
value: '!curl -L https://git.io/coffee'
|
|
tag: fun
|
|
|
|
- name: ytdl
|
|
value: youtube-dl
|
|
|
|
- name: weather
|
|
value: 'curl --fail -s "https://wttr.in/?format=v2"'
|
|
|
|
- name: moon
|
|
value: 'curl --fail -s "https://wttr.in/moon"'
|
|
|
|
- name: ./maange.py
|
|
description: Yet another fat finger autocorrector, but for Django.
|
|
value: ./manage.py
|
|
tag: python
|
|
|
|
- name: ./maange.Py
|
|
value: ./manage.py
|
|
tag: python
|
|
|
|
- name: prunetmpenv
|
|
description: >-
|
|
Using virtualenvwrapper's `mktmpenv`, then not deactivating properly,
|
|
results in useless environments piling up!
|
|
value: 'rmvirtualenv $(wk | grep ^tmp-)'
|
|
tag: python
|
|
|
|
- name: unzst
|
|
description: Because I always forget how to extract .tar.zst archives.
|
|
value: tar -I zstd -xf
|
|
|
|
- name: flushall
|
|
description: Clear all of the local Redis database!
|
|
value: "echo FLUSHALL | redis-cli"
|
|
tag: specific
|
|
|
|
- name: poule
|
|
value: pull
|
|
description: >-
|
|
French pun: the french noun «poule» (chicken) is pronounced
|
|
in the same way as the english verb "pull".
|
|
type: git
|
|
tag: fun
|
|
|
|
- name: gud
|
|
description: Mac- and Linux-compatible.
|
|
value: >-
|
|
!xdg-open http://lmgtfy.com/\?s\=d\&iie\=1\&q\=how+to+use+git 2>/dev/null
|
|
|| open http://lmgtfy.com/\?s\=d\&iie\=1\&q\=how+to+use+git
|
|
type: git
|
|
tag: fun
|
|
|
|
- name: mkcd
|
|
type: function
|
|
description: Stolen from some reply on StackExchange.
|
|
value: |-
|
|
case "$1" in
|
|
*/..|*/../) cd -- "$1";;
|
|
/*/../*) (cd "${1%/../*}/.." && mkdir -p "./${1##*/../}") && cd -- "$1";;
|
|
/*) mkdir -p "$1" && cd "$1";;
|
|
*/../*) (cd "./${1%/../*}/.." && mkdir -p "./${1##*/../}") && cd "./$1";;
|
|
../*) (cd .. && mkdir -p "${1#.}") && cd "$1";;
|
|
*) mkdir -p "./$1" && cd "./$1";;
|
|
esac
|
|
|
|
- name: ytmp3
|
|
type: function
|
|
description: >-
|
|
I mostly only ever use youtube-dl to fill my music library.
|
|
You can use this as `ytmp3 dQw4w9WgXcQ` to use the video's original title,
|
|
or `ytmp3 dQw4w9WgXcQ "We Are Number One"` to use your own.
|
|
value: 'youtube-dl -x --audio-format mp3 -o "${2:-%(title)s}.%(ext)s" "$1"'
|
|
|
|
- name: ttm
|
|
type: function
|
|
value: 'curl -F"file=@$1" https://ttm.sh'
|
|
|
|
- name: ttmu
|
|
type: function
|
|
value: 'curl -F"url=$1" https://ttm.sh'
|
|
|
|
- name: shorten
|
|
type: function
|
|
value: 'curl -F"shorten=$1" https://ttm.sh'
|
|
|
|
- name: oxo
|
|
type: function
|
|
value: 'curl -F"file=@$1" https://0x0.st'
|
|
|
|
- name: gbdo
|
|
type: function
|
|
value: 'git push origin -d $@ && git branch -D $@'
|
|
tag: git
|
|
|
|
- name: gpmr
|
|
type: function
|
|
description: >-
|
|
Git push with options for automatically creating a GitLab merge request
|
|
with a given title.
|
|
value: |-
|
|
[ "$#" -le 0 ] && echo "Usage: $0 <title> <other options>" && return 1
|
|
local title=$1
|
|
shift
|
|
git push -u origin \
|
|
-o merge_request.create \
|
|
-o merge_request.target=master \
|
|
-o merge_request.remove_source_branch \
|
|
-o merge_request.title="$title" \
|
|
$*
|
|
tag: git
|