diff --git a/.subbash/aliases b/.subbash/aliases index 0b10271..468212c 100644 --- a/.subbash/aliases +++ b/.subbash/aliases @@ -13,10 +13,9 @@ if [ -x "$(which dircolors)" ]; then alias ls='ls --color=auto' fi -# these aliases use the "ls" alias, which was defined earlier -alias l.='ls -AF --ignore="*"' -alias ll='ls -lhF' -alias la='ls -AF' +alias l.='ls -A --ignore="*"' +alias ll='ls -lh' +alias la='ls -A' alias lt='du -sh * | sort -h' diff --git a/.subbash/functions b/.subbash/functions index b982f06..e7086dd 100644 --- a/.subbash/functions +++ b/.subbash/functions @@ -8,7 +8,7 @@ lsl () { DIR="$(pwd)" fi - ls -lhFA --color=always "${DIR}" | less -R + ls -lhFA --color=always "${DIR}" | tail -n +2 | less -R } workon() { @@ -114,3 +114,13 @@ json() { python -m json.tool | pygmentize -l javascript fi } + +backup-it() { + local cur_dir_name bkp_dir + + bkp_dir=~/Backup/$(date +"%d-%m-%y") + cur_dir_name="$(basename "$PWD")" + + mkdir -p "$bkp_dir"/"$cur_dir_name" || true + tar czf - * | gpg -c > "$bkp_dir"/"$cur_dir_name"/"$(date +"%H-%M-%S")".tar.gz.gpg +} diff --git a/etc/bash_completion.d/all b/etc/bash_completion.d/all index 0275369..f98a265 100644 --- a/etc/bash_completion.d/all +++ b/etc/bash_completion.d/all @@ -13,7 +13,7 @@ _workon() COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" - envs=`ls /opt/pythonenv/` + envs=$(ls /opt/pythonenv/) COMPREPLY=( $(compgen -W "${envs}" -- ${cur}) ) }