@@ -9,16 +9,26 @@ alias mv='mv -i'
9
9
alias ln=' ln -i'
10
10
alias rm=' rm -i'
11
11
alias mkdir=' mkdir -p'
12
+ alias paths=' echo $PATH | tr ":" "\n"'
13
+
14
+ alias reload=' exec $SHELL -l'
12
15
13
16
mkcd () {
14
- mkdir " $@ " && cd " $@ "
17
+ mkdir " $@ " && cd " $@ " || exit
15
18
}
16
19
17
20
# gsudo wrapper
18
21
sudo () {
19
22
WSLENV=WSL_DISTRO_NAME:USER:$WSLENV MSYS_NO_PATHCONV=1 gsudo.exe " $@ "
20
23
}
21
24
25
+ # common locations
26
+ alias dotf=" cd $DOTFILES "
27
+ alias docs=" cd $USERPROFILE /Documents"
28
+ alias desktop=" cd $USERPROFILE /Desktop"
29
+ alias downloads=" cd $USERPROFILE /Downloads"
30
+ alias home=" cd $USERPROFILE "
31
+
22
32
# chmod:
23
33
# Stolen from: - https://github.com/ohmybash/oh-my-bash/blob/master/aliases/chmod.aliases.sh
24
34
alias perm=' stat --printf "%a %n \n "' # Show permission of target in number
@@ -34,6 +44,38 @@ alias ux='chmod u+x' # ---x------ (user: --x, group: -, other:
34
44
alias g=' git'
35
45
\. /mingw64/share/git/completion/git-completion.bash
36
46
47
+ if command -v lazygit > /dev/null 2>&1 ; then
48
+ alias lg=' lazygit'
49
+ fi
50
+
51
+ # oh-my-posh
52
+ if command -v oh-my-posh > /dev/null 2>&1 ; then
53
+ alias omp=' oh-my-posh'
54
+ source <( oh-my-posh completion bash)
55
+ eval " $( oh-my-posh init bash --config $DOTFILES /home/bash-zen.toml) "
56
+ fi
57
+
58
+ if command -v eza > /dev/null 2>&1 ; then
59
+ alias ls=' eza --git --icons --group --group-directories-first --time-style=long-iso --color-scale=all'
60
+ alias l=' ls --git-ignore'
61
+ alias ll=' ls --all --header --long'
62
+ alias lm=' ls --all --header --long --sort=modified'
63
+ alias la=' ls -lbhHigUmuSa'
64
+ alias lx=' ls -lbhHigUmuSa@'
65
+ alias lt=' eza --all --icons --group --group-directories-first --tree --color-scale=all'
66
+ alias tree=' ls --tree'
67
+ else
68
+ alias dir=' ls -hFx'
69
+ alias ls=' ls --color=auto'
70
+ alias l=' ls -CF'
71
+ alias lm=' ls -al | more'
72
+ alias ll=' ls -lAFh'
73
+ alias la=' ls -Al'
74
+
75
+ # lr: Full Recursive Directory Listing
76
+ alias lr=' ls -R | grep ":$" | sed -e ' \' ' s/:$//' \' ' -e ' \' ' s/[^-][^\/]*\//--/g' \' ' -e ' \' ' s/^/ /' \' ' -e ' \' ' s/-/|/' \' ' | less'
77
+ fi
78
+
37
79
# docker
38
80
if command -v docker > /dev/null 2>&1 ; then
39
81
alias d=' docker'
50
92
if command -v pip > /dev/null 2>&1 ; then
51
93
source <( pip completion --bash)
52
94
fi
95
+
96
+ # zoxide
97
+ if command -v zoxide > /dev/null 2>&1 ; then
98
+ eval " $( zoxide init bash --cmd cd) "
99
+ fi
0 commit comments