From 769b817d298e0e2fae5e1b2d7dd15c909726e5f4 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Mon, 19 Dec 2022 15:20:43 -0500 Subject: [PATCH] Promote uv to its own outline --- zshrc.org | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) 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