dots

git clone git://mattcarlson.org/repos/dots.git
Log | Files | Refs

functionrc (551B)


      1 #!/bin/sh
      2 #
      3 # functionrc
      4 
      5 f() { fff "${@}" && cd "$(cat "${XDG_CACHE_HOME:-${HOME}/.cache/}/fff/.fff_d")" || exit ; }
      6 s() { du -a "${HOME}" | awk '{ $1="" } { gsub("^ ", "", $0); print "\"" $0 "\"" }' | fzf | sed -e 's/^.//' -e 's/.$//' | open.sh ; }
      7 rands() { </dev/urandom tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' | head -c "${1}"; printf '\n' ; }
      8 rp() { for f in *; do mv "${f}" "$(printf '%s\n' "${f}" | sed "s/${1}/${2}/g")"; done ; }
      9 utl() { for f in *; do mv "${f}" "$(printf '%s\n' "${f}" | tr '[:upper:]' '[:lower:]')"; done ; }