Merge branch 'update_bash_branch' of github.com:dylanjtuttle/bash-it into update_bash_branch
commit
c222e5001c
|
|
@ -7,7 +7,7 @@ jobs:
|
||||||
bats-test:
|
bats-test:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, ubuntu-18.04, macos-10.15, macos-11]
|
os: [ubuntu-20.04, ubuntu-22.04, macos-12, macos-11]
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,6 @@ alias rd='rmdir'
|
||||||
# Shorten extract
|
# Shorten extract
|
||||||
alias xt='extract'
|
alias xt='extract'
|
||||||
|
|
||||||
# sudo editors
|
|
||||||
alias svim='sudo ${VISUAL:-vim}'
|
|
||||||
alias snano='sudo nano'
|
|
||||||
|
|
||||||
# Display whatever file is regular file or folder
|
# Display whatever file is regular file or folder
|
||||||
function catt() {
|
function catt() {
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ completion/available/dmidecode.completion.bash
|
||||||
completion/available/docker-machine.completion.bash
|
completion/available/docker-machine.completion.bash
|
||||||
completion/available/docker.completion.bash
|
completion/available/docker.completion.bash
|
||||||
completion/available/dotnet.completion.bash
|
completion/available/dotnet.completion.bash
|
||||||
|
completion/available/flutter.completion.bash
|
||||||
completion/available/gcloud.completion.bash
|
completion/available/gcloud.completion.bash
|
||||||
completion/available/gem.completion.bash
|
completion/available/gem.completion.bash
|
||||||
completion/available/git.completion.bash
|
completion/available/git.completion.bash
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
if _command_exists flutter; then
|
if _command_exists flutter; then
|
||||||
eval "$(flutter bash-completion)"
|
eval "$(flutter bash-completion)"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ _is_function _rl_enabled ||
|
||||||
_pj() {
|
_pj() {
|
||||||
_is_function _init_completion || return
|
_is_function _init_completion || return
|
||||||
_is_function _rl_enabled || return
|
_is_function _rl_enabled || return
|
||||||
[ -n "$PROJECT_PATHS" ] || return
|
[ -n "$BASH_IT_PROJECT_PATHS" ] || return
|
||||||
shift
|
shift
|
||||||
[ "$1" == "open" ] && shift
|
[ "$1" == "open" ] && shift
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@ _pj() {
|
||||||
local -r mark_dirs=$(_rl_enabled mark-directories && echo y)
|
local -r mark_dirs=$(_rl_enabled mark-directories && echo y)
|
||||||
local -r mark_symdirs=$(_rl_enabled mark-symlinked-directories && echo y)
|
local -r mark_symdirs=$(_rl_enabled mark-symlinked-directories && echo y)
|
||||||
|
|
||||||
for i in ${PROJECT_PATHS//:/$'\n'}; do
|
for i in ${BASH_IT_PROJECT_PATHS//:/$'\n'}; do
|
||||||
# create an array of matched subdirs
|
# create an array of matched subdirs
|
||||||
k="${#COMPREPLY[@]}"
|
k="${#COMPREPLY[@]}"
|
||||||
for j in $( compgen -d $i/$cur ); do
|
for j in $( compgen -d $i/$cur ); do
|
||||||
|
|
|
||||||
|
|
@ -63,12 +63,15 @@ function dirs-help() {
|
||||||
if [[ -f "${BASH_IT_DIRS_BKS?}" ]]; then
|
if [[ -f "${BASH_IT_DIRS_BKS?}" ]]; then
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source "${BASH_IT_DIRS_BKS?}"
|
source "${BASH_IT_DIRS_BKS?}"
|
||||||
elif [[ -f ~/.dirs ]]; then
|
|
||||||
mv -vn ~/.dirs "${BASH_IT_DIRS_BKS?}"
|
|
||||||
# shellcheck disable=SC1090
|
|
||||||
source "${BASH_IT_DIRS_BKS?}"
|
|
||||||
else
|
else
|
||||||
touch "${BASH_IT_DIRS_BKS?}"
|
mkdir -p "${BASH_IT_DIRS_BKS%/*}"
|
||||||
|
if [[ -f ~/.dirs ]]; then
|
||||||
|
mv -vn ~/.dirs "${BASH_IT_DIRS_BKS?}"
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
source "${BASH_IT_DIRS_BKS?}"
|
||||||
|
else
|
||||||
|
touch "${BASH_IT_DIRS_BKS?}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
alias L='cat "${BASH_IT_DIRS_BKS?}"'
|
alias L='cat "${BASH_IT_DIRS_BKS?}"'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue