all repos — dotfiles @ dd2db8ae42d358267a4fcdc13fa096d431d0d08d

linux dotfiles

remove similar looking ascii chars from slugen
Prithu Goswami prithugoswami524@gmail.com
Fri, 25 Dec 2020 19:34:59 +0530
commit

dd2db8ae42d358267a4fcdc13fa096d431d0d08d

parent

0f48d00d7d0323fc4cbdb00776ce9c10c79ff080

2 files changed, 6 insertions(+), 5 deletions(-)

jump to
M .bashrc.bashrc

@@ -114,7 +114,8 @@

alias ls='ls --color=auto' #PS1='\[\033[34m\][\u@\h\[\033[01;00m\] \w\[\033[34m]\]\[\033[00m\]$ ' -PS1="\[\033[01;34m\][\[\033[01;00m\]\w\[\033[01;34m\]]\[\033[01;00m\]\[\033[01;32m\]\$(git branch 2>/dev/null | grep '^*' | colrm 1 2 | sed 's/^/ (/' | sed 's/$/)/') \[\033[01;00m\]" +# PS1="\[\033[01;34m\][\[\033[01;00m\]\w\[\033[01;34m\]]\[\033[01;00m\]\[\033[01;32m\]\$(git branch 2>/dev/null | grep '^*' | colrm 1 2 | sed 's/^/ (/' | sed 's/$/)/') \[\033[01;00m\]\n› " +PS1="\w\[\033[01;34m\]\[\033[01;00m\]\[\033[01;32m\]\$(git branch 2>/dev/null | grep '^*' | colrm 1 2 | sed 's/^/ (/' | sed 's/$/)/') \[\033[01;00m\]› " #PS1='\[\033[01;32m\]ॐ [\[\033[37m\]\w\[\033[32m\]]\[\033[00m\] ' #PS1='\[\033[01;32m\]⮞ [\[\033[37m\]\w\[\033[32m\]]\[\033[00m\] '

@@ -131,7 +132,7 @@ HISTIGNORE='ls:bg:fg:history:cd:rm'

slugen () { # generate a slug of alphabets - dd if=/dev/urandom status=none bs=1024 count=1 | strings | tr -d '[:space:][:punct:][:digit:]' | cut -c -${1:-4} + dd if=/dev/urandom status=none bs=1024 count=1 | strings | tr -d '[:space:][:punct:][:digit:][Ilq]' | cut -c -${1:-4} } PROMPT_DIRTRIM=2
M bin/scripts/xupbin/scripts/xup

@@ -10,7 +10,7 @@

slugen () { # generate a slug of alphabets dd if=/dev/urandom status=none bs=1024 count=1 | \ - strings | tr -d '[:space:][:punct:][:digit:]' | cut -c -${1:-3} + strings | tr -d '[:space:][:punct:][:digit:][lIq]' | cut -c -${1:-3} }

@@ -25,10 +25,10 @@ ext=$(echo "$1" | grep '\.' | cut -d '.' -f2 | sed 's/^/\./')

else ext="" fi - rsync "$1" "$remote_hostname:.share/$slug$ext" || exit 1 + rsync --ignore-existing "$1" "$remote_hostname:.share/$slug$ext" || exit 1 echo "$remote_url/$slug$ext" else - rsync "$1" "$remote_hostname:.share/$2" || exit 1 + rsync --ignore-existing "$1" "$remote_hostname:.share/$2" || exit 1 echo "$remote_url/$2" fi fi