summaryrefslogtreecommitdiff
path: root/choose
diff options
context:
space:
mode:
authorepoch <epoch@hack.thebackupbox.net>2020-12-22 07:03:45 +0000
committerepoch <epoch@hack.thebackupbox.net>2020-12-22 07:03:45 +0000
commite50dd187814cfa974844d3c55142ef71a3aa5bc6 (patch)
tree78b2c528cd506ab730c4b8c4ad4d0607bf11a339 /choose
parentd38c9f8b33197ec48c63aa7a03df9beed0400b49 (diff)
downloaduritools-e50dd187814cfa974844d3c55142ef71a3aa5bc6.tar.gz
uritools-e50dd187814cfa974844d3c55142ef71a3aa5bc6.zip
choose now uses ledit if $DISPLAY isn't set
Diffstat (limited to 'choose')
-rwxr-xr-xchoose6
1 files changed, 5 insertions, 1 deletions
diff --git a/choose b/choose
index 73c74aa..be4602a 100755
--- a/choose
+++ b/choose
@@ -6,4 +6,8 @@
#message=$1
#shift
#sed 's|,|\\,|g;s|:|\\:|g' | tr '\n' ',' | rev | cut -b2- | rev | tr '\n' '\0' | xargs -0 xmessage -nearmouse "$@" "$message" -print -buttons
-dmenu -l 10 -p "$1"
+if [ $DISPLAY ];then
+ dmenu -l 10 -p "$1"
+else
+ printf "%s" "$1" ; ledit head -n1
+fi