scripts

My personal collection of scripts
git clone git://src.gearsix.net/scripts
Log | Files | Refs | Atom | README | LICENSE

commit 79eece7b28ad1b887f0d7f5589566e637fc5cc01
parent cd69d3242bbe2322cfffaab6ea9f0dc3cf55c460
Author: gearsix <gearsix@tuta.io>
Date:   Sun, 13 Mar 2022 17:42:23 +0000

mkdnvim -> mkded; updated it to use sh; updated nvim -> $EDITOR

Diffstat:
Anix/mkded.sh | 16++++++++++++++++
Dnix/mkdnvim.sh | 17-----------------
2 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/nix/mkded.sh b/nix/mkded.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh +# mkded (mkdir & edit) +# description: makes directory $1 and opens file $2 in $EDITOR +# e.g.$ mkded ~/new file # create ~/new/file and edit it + +if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then + echo "Usage: mkdedit DIRECTORY FILENAME" + echo "" + echo "mkdir DIRECTORY and open \$DIRECTORY/\$FILENAME in \$EDITOR" + exit +fi + +mkdir $1; +cd $1; +touch $2; +$EDITOR $2; diff --git a/nix/mkdnvim.sh b/nix/mkdnvim.sh @@ -1,17 +0,0 @@ -#!/bin/sh -# mkdnvim (mkdir&nvim) -# description: makes directory $1 and opens file $2 using nvim -# e.g.$ mkdnvim ~/new file #creates ~/new/file and nvim into it - -if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then - echo "Usage: mkdedit DIRECTORY FILENAME" - echo "" - echo "mkdir DIRECTORY and open \$DIRECTORY/\$FILENAME in \$EDITOR" - exit -fi - -mkdir $1; -cd $1; -touch $2; -$EDITOR $2; -