diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-29 12:07:33 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-29 12:54:03 +0200 |
commit | 7a27586bcbf6ef4330b8bc5b969bafa339293e77 (patch) | |
tree | 76f9ed627a95059e0056e4ebb025d3400ac1ddd8 | |
parent | 525233811c0f7c9358c5b12c6f7ceecf5bfe7d96 (diff) | |
download | mblaze-7a27586bcbf6ef4330b8bc5b969bafa339293e77.tar.gz mblaze-7a27586bcbf6ef4330b8bc5b969bafa339293e77.tar.xz mblaze-7a27586bcbf6ef4330b8bc5b969bafa339293e77.zip |
mless: R to toggle raw message
-rwxr-xr-x | mless | 12 | ||||
-rw-r--r-- | mlesskey.example | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/mless b/mless index 72ddd6c..97bce56 100755 --- a/mless +++ b/mless @@ -46,7 +46,13 @@ if [ "$1" = --filter ]; then exit fi - mshow "$2" | colormsg + if [ $MLESS_RAW -eq 0 ]; then + mshow "$2" | colormsg + else + mseq -r $2 + echo + cat "$(mseq -r $2)" + fi exit $? fi @@ -71,6 +77,7 @@ fi nl=" " +export MLESS_RAW=0 while :; do [ -f $HOME/.mless ] && export LESSKEY=$HOME/.mless LESSOPEN="|$0 --filter %s" \ @@ -87,5 +94,8 @@ while :; do mflag -S . mseq -f : | mseq -S mseq -C + + ;; + 82) # R toggle raw mode + MLESS_RAW=$((1-$MLESS_RAW)) esac done diff --git a/mlesskey.example b/mlesskey.example index bfb08b6..65acdd8 100644 --- a/mlesskey.example +++ b/mlesskey.example @@ -7,5 +7,6 @@ Q quit \1 S noaction E//scan\n ` noaction E\#\n N quit N +R quit R k quit k d quit d |