From 65dc4d8c40fc2f408db2cb6c521a38dfa5bb949e Mon Sep 17 00:00:00 2001 From: zawz Date: Sat, 14 Aug 2021 13:55:24 +0200 Subject: [PATCH] add bash completion --- Makefile | 7 +++++++ README.md | 7 +++++++ completion/lxsh.bash | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 completion/lxsh.bash diff --git a/Makefile b/Makefile index c7f6dc5..58b2830 100644 --- a/Makefile +++ b/Makefile @@ -87,3 +87,10 @@ clean: clear: rm $(BINDIR)/$(NAME) + +install: + cp lxsh /usr/local/bin + cp completion/lxsh.bash /etc/bash_completion.d + +uninstall: + rm /usr/local/bin/lxsh /etc/bash_completion.d/lxsh.bash diff --git a/README.md b/README.md index b660059..9286684 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,12 @@ sudo mv lxsh /usr/local/bin ## Other +Clone this repository then: +```shell +make -j +sudo make install +``` + See [Build](#build). # Features @@ -45,6 +51,7 @@ These commands can be placed anywhere within the script like regular commands. Reduce code size to a minimum without changing functionality with the `-m` option. +> This option should be safe to use in any situation #### Behaviors of the minify option diff --git a/completion/lxsh.bash b/completion/lxsh.bash new file mode 100644 index 0000000..c33e5fe --- /dev/null +++ b/completion/lxsh.bash @@ -0,0 +1,3 @@ +#/usr/bin/env bash + +complete -F _longopt lxsh