diff --git a/zshrc.org b/zshrc.org index 712baad..b5376cb 100644 --- a/zshrc.org +++ b/zshrc.org @@ -207,7 +207,24 @@ BIG FAT WARNING: this needs to specify an actual file as a destination set-konsole-title ${previous_title} } #+end_src - +*** shell helpers :daily:pi:android: +Underscore filename +#+begin_src sh + # this function is a poor-man eselect for configuration files + # it mv's filename to filename_ or viceversa + uv() { + if [[ -f $1 ]]; then + if [[ ${1:(-1)} == '_' ]]; then + mv -i $1 ${1%_} + else + mv -i $1 $1_ + fi + else + echo $0: \'$1\': no such file or directory + return 1 + fi + } +#+end_src *** emacs helpers :daily:pi: #+begin_src sh SOLARIZED="true" @@ -466,21 +483,6 @@ technique alias d.u='ssh dropbox.utoronto "~/dropbox.py"' alias -g C='| xclip' - - # this function is a poor-man eselect for configuration files - # it mv's filename to filename_ or viceversa - uv() { - if [[ -f $1 ]]; then - if [[ ${1:(-1)} == '_' ]]; then - mv -i $1 ${1%_} - else - mv -i $1 $1_ - fi - else - echo $0: \'$1\': no such file or directory - return 1 - fi - } #+end_src *** Named directories :daily: #+begin_src sh