diff options
author | Karel Kočí <cynerd@email.cz> | 2017-10-22 22:18:02 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-10-22 22:18:02 +0200 |
commit | b5d63999c82eb89c0bd671c2ae04b936b6ec714d (patch) | |
tree | 4f5a11ea1f35393a95d918f5f5812414e47353ab /shellrc | |
parent | 97ccd8d036996684d1ba6acf56bda61c7e184090 (diff) | |
parent | 8cf55e56aeb59c076c26e3bd4636bbf82bb1eeb5 (diff) | |
download | myconfigs-b5d63999c82eb89c0bd671c2ae04b936b6ec714d.tar.gz myconfigs-b5d63999c82eb89c0bd671c2ae04b936b6ec714d.tar.bz2 myconfigs-b5d63999c82eb89c0bd671c2ae04b936b6ec714d.zip |
Merge branch 'master' into server
Diffstat (limited to 'shellrc')
-rw-r--r-- | shellrc | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -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 |