-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathalf.conf
40 lines (35 loc) · 1.25 KB
/
alf.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Base Alias:
# Any line that does not start with a whitespace is considered a base
# alias.
dir: ls -l
# Sub Aliases:
# Any line that starts with one or more whitespaces will be nested as
# a subcommand of the previous base alias.
g: git
s: status
c: add . --all && git commit -am
l: log --all --graph --date=relative
p: push
# Reuse:
# You can call an alias from another alias
gg: g p
# Escape code:
# Sub commands that start with an exclamation mark will not be prefixed
# by their parent command
dc: docker-compose
deploy: !docker stack deploy -c docker-compose.yml
upd: up -d
# Virtual command:
# When you do not need to prepend your sub aliases with the primary command,
# specify an exclamation mark in the primary command
dns: !
check: host -t ns
flush: sudo systemd-resolve --flush-caches
# Arguments:
# By default, all arguments that are provided in the input are passed on to
# the alias, using "$@". If your command contains the `$` symbol, then the
# array of arguments will NOT be appended to the command.
# You can even provide a default value to the argument using the standard
# bash syntax, and use any bash construct, like inline functions.
count: find ${1:-.} -type f | wc -l
binlink: sudo ln -fs "$(realpath $1)" "/usr/local/bin/$1"