summaryrefslogtreecommitdiffstats
path: root/.config/fish/conf.d/alias.fish
blob: 2057b0de2e61b857a8bc0b2701f43cc6a935686c (plain) (blame)
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
# ls & alternatives
if type -q eza
    function ls --wraps eza
        eza --long --almost-all --binary --smart-group --group-directories-first --git --git-repos --color=auto --icons=never $argv
    end

    function lss --wraps eza --description "ls with total dir size"
        ls --total-size $argv
    end
end

function goto
    if test -d $argv[1]
        cd $argv[1]
    end

    mkdir -p $argv[1] && cd $argv[1]
end

function gitinit -a name
    if test -z "$name"
        set name "./"
    end

    goto $name

    git init
    git commit -m "Initial commit" --allow-empty
end

function weather -a location
    set no_follow "F"

    curl --get --data "$no_follow" "wttr.in/$location"
end