dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 947458ff666c7984f7a21e8222164fdc7a35ff04
parent 73471314a16c35385f57154e2ae7d943b94774d0
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri,  1 Jun 2018 13:11:25 -0400

Remove text.sh and add zmv to zsh

Diffstat:
Mlinks/.zshrc | 8+++++++-
Dlinks/bin/text.sh | 38--------------------------------------
2 files changed, 7 insertions(+), 39 deletions(-)

diff --git a/links/.zshrc b/links/.zshrc @@ -19,7 +19,7 @@ unsetopt hist_verify # verify before executing cmd from history (e.g. !!) unsetopt notify # report status of bg jobs immediately unsetopt nomatch # show error if wildcards do not match any files -autoload -Uz add-zsh-hook cdr chpwd_recent_dirs compinit select-bracketed select-quoted +autoload -Uz add-zsh-hook cdr chpwd_recent_dirs compinit select-bracketed select-quoted zmv compinit add-zsh-hook chpwd chpwd_recent_dirs @@ -107,6 +107,12 @@ do alias -s $suffix=$PAGER done +# remember -n flag for dry runs +alias zmv='noglob zmv' +alias zcp='noglob zmv -C' +alias zln='noglob zmv -L' +alias zsy='noglob zmv -Ls' + #### ZSH APPEARANCE diff --git a/links/bin/text.sh b/links/bin/text.sh @@ -1,38 +0,0 @@ -#!/bin/bash -e - -my_number='+18582473666' - -if [ "$1" == "susan" ]; then - number='+18582478946' -elif [ "$1" == "anders" ]; then - number='+18582478944' -elif [ "$1" == "christian" ]; then - number='+4530246587' -else - echo "recipient '$1' not recognized" - exit 1 -fi - -if [ -z "$TWILIO_AUTH_TOKEN" ]; then - echo "error: TWILIO_AUTH_TOKEN not set" - exit 1 -fi - -twilio_account_sid=AC4f71fe53fd07f12da0cea8295b078548 -twilio_auth_token=$TWILIO_AUTH_TOKEN - -message="$2" - -# Send a text message -response=$(curl -X POST --fail --show-error --silent\ - "https://api.twilio.com/2010-04-01/Accounts/$twilio_account_sid/Messages.xml"\ - --data-urlencode "From=$my_number" \ - --data-urlencode "To=$number" \ - --data-urlencode "Body=$message" \ - -u "$twilio_account_sid:$twilio_auth_token" ) - -# Log errors -if [ $? -gt 0 ]; then - echo "Failed to send SMS: $response" - exit 1 -fi