From cba433e2f46cd9d492e01b60da4d4319f3d602ba Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 27 Aug 2023 15:50:48 +0300 Subject: Remove the bloated ā€˜-nā€™ option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If you need to copy a password without a newline, just do: $ mkpass | wl-copy -n If you just happen to need no newlines for other purposes: $ mkpass | xargs printf '%s' --- mkpass | 7 +++---- mkpass.1 | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/mkpass b/mkpass index d1acc08..0eff77d 100755 --- a/mkpass +++ b/mkpass @@ -3,14 +3,13 @@ set -e usage() { - echo "Usage: ${0##*/} [-n] [-l length] [chars]" >&2 + echo "Usage: ${0##*/} [-l length] [chars]" >&2 exit 1 } -while getopts 'l:n' o; do +while getopts 'l:' o; do case "$o" in l) len="$OPTARG" ;; - n) nnl=false ;; *) usage ;; esac done @@ -18,4 +17,4 @@ done shift $((OPTIND - 1)) [ $# -gt 1 ] && usage