remove similar looking ascii chars from slugen
Prithu Goswami prithugoswami524@gmail.com
Fri, 25 Dec 2020 19:34:59 +0530
2 files changed,
6 insertions(+),
5 deletions(-)
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/xup
→
bin/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