flexibeast / kitty_keys Goto Github PK
View Code? Open in Web Editor NEWA POSIX shell function to output keybindings for the kitty terminal emulator.
License: ISC License
A POSIX shell function to output keybindings for the kitty terminal emulator.
License: ISC License
Thank you for the useful script. In my initial runs on Ubuntu Linux 20.04 and macOS Monterey 12.6.2 the kitty_keys
function works and displays my Kitty key bindings but I get some error output from grep
and column
.
On my Linux system the error is:
grep: Unmatched [, [^, [:, [., or [=
On macOS the error is:
grep: brackets ([ ]) not balanced
column: line too long
(null)
I can get rid of this error output from grep and column by redirecting stderr to /dev/null in the script.
Perhaps these errors are indicative of some improper key bindings in my setup or too many or some other issue in my Kitty config. I have not tracked down the source of these.
Here is the output of diff -Naur ...
showing my simple changes (not really sure whether hiding these errors is a good idea):
--- kitty_keys.sh.00 2023-02-19 12:14:08.000000000 -0800
+++ kitty_keys.sh 2023-02-19 12:14:37.000000000 -0800
@@ -141,7 +141,7 @@
IFS=' '
for B in $BINDINGS
do
- if print1 "${DEFAULTS}" | grep -q "${B}"
+ if print1 "${DEFAULTS}" | grep -q "${B}" 2> /dev/null
then
DEFAULTS=$(print1 "${DEFAULTS}" | sed "/${B}/d")
fi
@@ -213,14 +213,14 @@
;;
esac
- print1 "${LEADING}${OUT}" | column -t -s':'
+ print1 "${LEADING}${OUT}" | column -t -s':' 2> /dev/null
if [ -n "${WANT_FOOTER}" -a -n "${FOOTER}" ]
then
print1 "${FOOTER}\n"
fi
if [ -n "${TRAILING}" ]
then
- print1 "${TRAILING}" | column -t -s':'
+ print1 "${TRAILING}" | column -t -s':' 2> /dev/null
fi
# Remove convenience function from environment.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.