File: more-fix-broken-command-command-key.patch

package info (click to toggle)
util-linux 2.41-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 95,208 kB
  • sloc: ansic: 179,016; sh: 22,689; yacc: 1,284; makefile: 528; xml: 422; python: 316; lex: 89; ruby: 75; csh: 37; exp: 19; sed: 16; perl: 15; sql: 9
file content (25 lines) | stat: -rw-r--r-- 754 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: cgoesche <cgoesc2@wgu.edu>
Date: Sat, 5 Apr 2025 01:43:04 -0400
Subject: more: fix broken ':!command' command key

Addresses: #3509
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
(cherry picked from commit 3f3bb6f9103daaf7a8f47ebe57cbe90bac852e6e)
---
 text-utils/more.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/text-utils/more.c b/text-utils/more.c
index f80aeff..64168d7 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -862,6 +862,9 @@ static struct number_command read_command(struct more_control *ctl)
 			case 'p':
 				cmd.key = more_kc_previous_file;
 				return cmd;
+			case '!':
+				cmd.key = more_kc_run_shell;
+				return cmd;
 			default:
 				cmd.key = more_kc_unknown_command;
 				return cmd;