aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-23 13:27:17 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-23 13:27:17 -0300
commita9e5ae8b4c9fc01da055d684a155714c4fa3723b (patch)
tree5431c4220ba8a02e28dd46aa42202799460bfcfd
parent17cee9bd363109dd2f113d001995774d8f9087fa (diff)
downloadutils-x11-a9e5ae8b4c9fc01da055d684a155714c4fa3723b.tar.gz
utils-x11-a9e5ae8b4c9fc01da055d684a155714c4fa3723b.tar.bz2
Session: choose by number or name
-rwxr-xr-xsession2
1 files changed, 1 insertions, 1 deletions
diff --git a/session b/session
index c2c7d30..d2e5da5 100755
--- 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