update
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
|
||||
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
|
||||
# only accepts ESC backslash for ST.
|
||||
function print_osc() {
|
||||
if [[ $TERM == screen* ]] ; then
|
||||
if [[ $TERM == screen* || $TERM == tmux* ]] ; then
|
||||
printf "\033Ptmux;\033\033]"
|
||||
else
|
||||
printf "\033]"
|
||||
@@ -13,7 +13,7 @@ function print_osc() {
|
||||
|
||||
# More of the tmux workaround described above.
|
||||
function print_st() {
|
||||
if [[ $TERM == screen* ]] ; then
|
||||
if [[ $TERM == screen* || $TERM == tmux* ]] ; then
|
||||
printf "\a\033\\"
|
||||
else
|
||||
printf "\a"
|
||||
@@ -24,13 +24,15 @@ function show_help() {
|
||||
echo "Usage:" 1>& 2
|
||||
echo " $(basename $0) set Fn Label" 1>& 2
|
||||
echo " Where n is a value from 1 to 20" 1>& 2
|
||||
echo " $(basename $0) set status Label" 1>& 2
|
||||
echo " Sets the touch bar status button's label" 1>& 2
|
||||
echo " $(basename $0) push [name]" 1>& 2
|
||||
echo " Saves the current labels with an optional name. Resets labels to their default value, unless name begins with a "." character." 1>& 2
|
||||
echo " $(basename $0) pop [name]" 1>& 2
|
||||
echo " If name is given, all key labels up to and including the one with the matching name are popped." 1>& 2
|
||||
echo "" 1>& 2
|
||||
echo "Example:" 1>& 2
|
||||
echo "#!/bin/bash" 1>& 2
|
||||
echo "#!/usr/bin/env bash" 1>& 2
|
||||
echo "# Wrapper script for mc that sets function key labels" 1>& 2
|
||||
echo "NAME=mc_\$RANDOM" 1>& 2
|
||||
echo "# Save existing labels" 1>& 2
|
||||
|
||||
Reference in New Issue
Block a user