diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/list-backend-scripts | 3 | ||||
-rwxr-xr-x | bin/load-bash-autocomplete | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/bin/list-backend-scripts b/bin/list-backend-scripts new file mode 100755 index 0000000..7f91060 --- /dev/null +++ b/bin/list-backend-scripts @@ -0,0 +1,3 @@ +#!/bin/bash +DIR=$(dirname $0) +find "$DIR/../app/backend" -maxdepth 1 -name \*.py -printf '%f\n' | sed 's/\.py$//' | grep "^$2" diff --git a/bin/load-bash-autocomplete b/bin/load-bash-autocomplete new file mode 100755 index 0000000..53c50fb --- /dev/null +++ b/bin/load-bash-autocomplete @@ -0,0 +1,12 @@ +#!/bin/bash +if [ -f ~/.bash_completion ]; then + cat .bash_completion | while read LINE + do + grep -q "$LINE" ~/.bash_completion || { + echo "$LINE" >> ~/.bash_completion + echo 'added "'$LINE'" to .bash_completion, reload your shell to use auto-complete' + } + done +else + cp .bash_completion ~/.bash_completion +fi |