aboutsummaryrefslogtreecommitdiff
path: root/shellrc
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-10-22 22:18:02 +0200
committerKarel Kočí <cynerd@email.cz>2017-10-22 22:18:02 +0200
commitb5d63999c82eb89c0bd671c2ae04b936b6ec714d (patch)
tree4f5a11ea1f35393a95d918f5f5812414e47353ab /shellrc
parent97ccd8d036996684d1ba6acf56bda61c7e184090 (diff)
parent8cf55e56aeb59c076c26e3bd4636bbf82bb1eeb5 (diff)
downloadmyconfigs-b5d63999c82eb89c0bd671c2ae04b936b6ec714d.tar.gz
myconfigs-b5d63999c82eb89c0bd671c2ae04b936b6ec714d.tar.bz2
myconfigs-b5d63999c82eb89c0bd671c2ae04b936b6ec714d.zip
Merge branch 'master' into server
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