aboutsummaryrefslogtreecommitdiff
path: root/shellrc
diff options
context:
space:
mode:
Diffstat (limited to 'shellrc')
-rw-r--r--shellrc15
1 files changed, 6 insertions, 9 deletions
diff --git a/shellrc b/shellrc
index a607bd9..1deea54 100644
--- a/shellrc
+++ b/shellrc
@@ -7,14 +7,11 @@
#################################################################################
# Aliases
-if [ "$(uname -s)" = "FreeBSD" ]; then
- alias ls='ls -G'
-else
- alias ls='ls --color=auto'
- eval $(dircolors -b)
- alias make="make -j$(nproc)"
-fi
+alias ls='ls --color=auto'
+eval $(dircolors -b)
alias ll='ls -lh'
+alias df='df -h'
+alias du='du -h'
alias grep='grep --color=auto'
alias git='LANG=en_GB git'
alias gdb='gdb -q'
@@ -51,8 +48,8 @@ fi
# Generate random password (optionally takes length of password as first argument)
genpasswd() {
local l=$1
- if [ "$l" = "" ]; then l=16; fi
- tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
+ [ -n "$l" ] || l=16
+ tr -dc A-Za-z0-9_ < /dev/urandom | head -c "$l" | xargs
}
# Run given command every second