Coder Social home page Coder Social logo

kitty_keys's People

Contributors

flexibeast avatar

Stargazers

 avatar

Watchers

 avatar

kitty_keys's Issues

Errors with grep, column on initial run

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.