| Line | |
|---|
| 1 | # meta.bash --- meta key frobnications
|
|---|
| 2 | # Author: Noah Friedman <[email protected]>
|
|---|
| 3 | # Created: 1992-06-28
|
|---|
| 4 | # Last modified: 1993-01-26
|
|---|
| 5 | # Public domain
|
|---|
| 6 |
|
|---|
| 7 | # Commentary:
|
|---|
| 8 | # Code:
|
|---|
| 9 |
|
|---|
| 10 | #:docstring meta:
|
|---|
| 11 | # Usage: meta [on|off]
|
|---|
| 12 | #
|
|---|
| 13 | # An argument of "on" will make bash use the 8th bit of any input from
|
|---|
| 14 | # a terminal as a "meta" bit, i.e bash will be able to use a real meta
|
|---|
| 15 | # key.
|
|---|
| 16 | #
|
|---|
| 17 | # An argument of "off" causes bash to disregard the 8th bit, which is
|
|---|
| 18 | # assumed to be used for parity instead.
|
|---|
| 19 | #:end docstring:
|
|---|
| 20 |
|
|---|
| 21 | function meta ()
|
|---|
| 22 | {
|
|---|
| 23 | case "$1" in
|
|---|
| 24 | on) bind 'set input-meta On'
|
|---|
| 25 | bind 'set output-meta on'
|
|---|
| 26 | bind 'set convert-meta off' ;;
|
|---|
| 27 | off) bind 'set input-meta Off'
|
|---|
| 28 | bind 'set output-meta off'
|
|---|
| 29 | bind 'set convert-meta on' ;;
|
|---|
| 30 | *) echo "Usage: meta [on|off]" 1>&2 ; return 1 ;;
|
|---|
| 31 | esac
|
|---|
| 32 | return 0
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
| 35 | provide meta
|
|---|
| 36 |
|
|---|
| 37 | # meta.bash ends here
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.