Merge lp:~jefferyto/byobu/fix-trailing-hash into lp:byobu

Proposed by Jeffery To
Status: Needs review
Proposed branch: lp:~jefferyto/byobu/fix-trailing-hash
Merge into: lp:byobu
Diff against target: 44 lines (+14/-2)
2 files modified
debian/changelog (+4/-0)
usr/lib/byobu/users (+10/-2)
To merge this branch: bzr merge lp:~jefferyto/byobu/fix-trailing-hash
Reviewer Review Type Date Requested Status
Dustin Kirkland  Pending
Review via email: mp+379412@code.launchpad.net

Description of the change

To show a literal '#', tmux needs two '#' characters while screen needs only one.

To post a comment you must log in.

Unmerged revisions

2644. By Jeffery To on 2020-02-18

* usr/lib/byobu/users:
  - Fix trailing '#' sign for screen

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2020-02-17 14:15:05 +0000
+++ debian/changelog 2020-02-18 20:36:39 +0000
@@ -2,6 +2,10 @@
22
3 * UNRELEASED3 * UNRELEASED
44
5 [ Jeffery To ]
6 * usr/lib/byobu/users:
7 - Fix trailing '#' sign for screen
8
5 -- Dustin Kirkland <kirkland@ubuntu.com> Mon, 17 Feb 2020 08:15:04 -06009 -- Dustin Kirkland <kirkland@ubuntu.com> Mon, 17 Feb 2020 08:15:04 -0600
610
7byobu (5.133-0ubuntu1) focal; urgency=medium11byobu (5.133-0ubuntu1) focal; urgency=medium
812
=== modified file 'usr/lib/byobu/users'
--- usr/lib/byobu/users 2019-05-26 19:18:32 +0000
+++ usr/lib/byobu/users 2020-02-18 20:36:39 +0000
@@ -26,7 +26,7 @@
26}26}
2727
28__users() {28__users() {
29 local count=029 local count=0 sign
30 if [ "$USERS_DISTINCT" = "1" ]; then30 if [ "$USERS_DISTINCT" = "1" ]; then
31 count=$(pgrep -fl 'sshd:.*@' | cut -f3 -d\ | cut -f1 -d@ | sort -u | wc -l)31 count=$(pgrep -fl 'sshd:.*@' | cut -f3 -d\ | cut -f1 -d@ | sort -u | wc -l)
32 else32 else
@@ -35,7 +35,15 @@
35 count=$(pgrep -f "^sshd:.*@|^/usr/sbin/sshd -i" | wc -l) || return35 count=$(pgrep -f "^sshd:.*@|^/usr/sbin/sshd -i" | wc -l) || return
36 fi36 fi
37 if [ $count -gt 0 ]; then37 if [ $count -gt 0 ]; then
38 color b w r; printf "%d" "$count"; color -; color w r; printf "##"; color --38 case "$BYOBU_BACKEND" in
39 tmux)
40 sign="##"
41 ;;
42 screen)
43 sign="#"
44 ;;
45 esac
46 color b w r; printf "%d" "$count"; color -; color w r; printf "$sign"; color --
39 else47 else
40 rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/users"*48 rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/users"*
41 fi49 fi

Subscribers

People subscribed via source and target branches