summaryrefslogtreecommitdiff
path: root/choose
diff options
context:
space:
mode:
authorepoch <epoch@thebackupbox.net>2022-09-05 08:08:05 +0000
committerepoch <epoch@thebackupbox.net>2022-09-05 08:08:05 +0000
commitf14b89fb90175e659e5652da50b5fc4fb4ca47c3 (patch)
tree9b04792327e2ee5dca87d1561dd482da7d6f5c71 /choose
parentd085cb196811bf3529b403089bf509de17980a57 (diff)
parent994e230b637fa0be9ee2f949737ac1754d985704 (diff)
downloaduritools-f14b89fb90175e659e5652da50b5fc4fb4ca47c3.tar.gz
uritools-f14b89fb90175e659e5652da50b5fc4fb4ca47c3.zip
Merge branch 'master' of ssh://git.thebackupbox.net/uritools
Diffstat (limited to 'choose')
-rwxr-xr-xchoose9
1 files changed, 8 insertions, 1 deletions
diff --git a/choose b/choose
index 763c71c..aa191e7 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]