repo: uritools
action: commit
revision: 
path_from: 
revision_from: b5b1d77dfd83853b5f4a945e02fbc9269114fe05:
path_to: 
revision_to: 
git.thebackupbox.net
uritools
git clone git://git.thebackupbox.net/uritools
commit b5b1d77dfd83853b5f4a945e02fbc9269114fe05
Author: epoch 
Date:   Fri Aug 19 01:24:02 2022 -0500

    limit a prompt to 64 characters

diff --git a/choose b/choose
index 763c71ca18254b26c840e4ca7b5b1d777cbcf680..
index ..aa191e7c1b86a9b98fefebdb99cf59cbd4e00f15 100755
--- a/choose
+++ b/choose
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 ### this script is meant to take a \n delimited list of things
 ### then give the user a way of selecting on of them.
 ### it should output the selection on a line by itself.
@@ -11,6 +11,13 @@ if [ "$1" ];then
 else
  prompt="< $0 >"
 fi
+
+if [ "${prompt}" != "${prompt:0:64}" ];then
+  prompt="${prompt:0:64}..."
+else
+  prompt="${prompt}"
+fi
+
 if [ $DISPLAY ];then
 #usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]
 #             [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]

-----END OF PAGE-----