]> gitweb.fluxo.info Git - utils-x11.git/commitdiff
Session: choose by number or name
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 23 Jun 2018 16:27:17 +0000 (13:27 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 23 Jun 2018 16:27:17 +0000 (13:27 -0300)
session

diff --git a/session b/session
index c2c7d309b69a9ed4ede402d53b1966c5d742b12e..d2e5da51f690143457b87a7926b5c031d46ac50a 100755 (executable)
--- a/session
+++ b/session
@@ -144,7 +144,7 @@ function __session_chooser {
   read -rep "Choose session: " n
 
   if [ ! -z "$n" ]; then
-    session="$(__session_list | grep "^$n." | sed -e "s/^$n. //" | cut -d : -f 1)"
+    session="$(__session_list | grep -E "(^$n.| $n:)" | sed -e "s/^$n. //" | cut -d : -f 1)"
 
     if [ ! -z "$session" ]; then
       __session_open $session