Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ffbc85a62 | ||
|
|
60c4c0b598 | ||
|
|
088212fd32 | ||
|
|
d1b831a92d | ||
|
|
69407018a7 | ||
|
|
a481ff41ab | ||
|
|
7cc2ced3b9 | ||
|
|
66fbed7f6f | ||
|
|
6b0ca17df0 | ||
|
|
23efb39fb0 | ||
|
|
e1ddf6e311 | ||
|
|
634c1f8c18 | ||
|
|
4686ce1f12 |
@@ -34,7 +34,7 @@ fi
|
|||||||
alias c='clear'
|
alias c='clear'
|
||||||
alias cls='clear'
|
alias cls='clear'
|
||||||
|
|
||||||
alias edit='${EDITOR:-${ALTERNATE_EDITOR?}}'
|
alias edit='${EDITOR:-${ALTERNATE_EDITOR:-nano}}'
|
||||||
alias pager='${PAGER:=less}'
|
alias pager='${PAGER:=less}'
|
||||||
|
|
||||||
alias q='exit'
|
alias q='exit'
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ lint_clean_files.sh
|
|||||||
#
|
#
|
||||||
completion/available/apm.completion.bash
|
completion/available/apm.completion.bash
|
||||||
completion/available/awless.completion.bash
|
completion/available/awless.completion.bash
|
||||||
|
completion/available/awscli.completion.bash
|
||||||
completion/available/bash-it.completion.bash
|
completion/available/bash-it.completion.bash
|
||||||
completion/available/brew.completion.bash
|
completion/available/brew.completion.bash
|
||||||
completion/available/cargo.completion.bash
|
completion/available/cargo.completion.bash
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
if _command_exists aws_completer
|
if _command_exists aws_completer; then
|
||||||
then
|
|
||||||
complete -C "$(command -v aws_completer)" aws
|
complete -C "$(command -v aws_completer)" aws
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -11,7 +11,10 @@ function _command_duration_pre_exec() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _dynamic_clock_icon {
|
function _dynamic_clock_icon {
|
||||||
local -i clock_hand=$(((${1:-${SECONDS}} % 12) + 90))
|
local clock_hand
|
||||||
|
# clock hand value is between 90 and 9b in hexadecimal.
|
||||||
|
# so between 144 and 155 in base 10.
|
||||||
|
printf -v clock_hand '%x' $(((${1:-${SECONDS}} % 12) + 144))
|
||||||
printf -v 'COMMAND_DURATION_ICON' '%b' "\xf0\x9f\x95\x$clock_hand"
|
printf -v 'COMMAND_DURATION_ICON' '%b' "\xf0\x9f\x95\x$clock_hand"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,9 +25,11 @@ function _command_duration() {
|
|||||||
local -i minutes=0 seconds=0 deciseconds=0
|
local -i minutes=0 seconds=0 deciseconds=0
|
||||||
local -i command_start_seconds="${command_start%.*}"
|
local -i command_start_seconds="${command_start%.*}"
|
||||||
local -i command_start_deciseconds=$((10#${command_start##*.}))
|
local -i command_start_deciseconds=$((10#${command_start##*.}))
|
||||||
|
command_start_deciseconds="${command_start_deciseconds:0:1}"
|
||||||
local current_time="${EPOCHREALTIME:-$SECONDS}"
|
local current_time="${EPOCHREALTIME:-$SECONDS}"
|
||||||
local -i current_time_seconds="${current_time%.*}"
|
local -i current_time_seconds="${current_time%.*}"
|
||||||
local -i current_time_deciseconds="$((10#${current_time##*.}))"
|
local -i current_time_deciseconds="$((10#${current_time##*.}))"
|
||||||
|
current_time_deciseconds="${current_time_deciseconds:0:1}"
|
||||||
|
|
||||||
if [[ "${command_start_seconds:-0}" -gt 0 ]]; then
|
if [[ "${command_start_seconds:-0}" -gt 0 ]]; then
|
||||||
# seconds
|
# seconds
|
||||||
|
|||||||
@@ -62,13 +62,13 @@ function _bash-it-array-dedup() {
|
|||||||
|
|
||||||
# Outputs a full path of the grep found on the filesystem
|
# Outputs a full path of the grep found on the filesystem
|
||||||
function _bash-it-grep() {
|
function _bash-it-grep() {
|
||||||
: "${BASH_IT_GREP:=$(type -p egrep || type -p grep)}"
|
: "${BASH_IT_GREP:=$(type -P egrep || type -P grep)}"
|
||||||
printf "%s" "${BASH_IT_GREP:-/usr/bin/grep}"
|
printf "%s" "${BASH_IT_GREP:-/usr/bin/grep}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Runs `grep` with extended regular expressions
|
# Runs `grep` with extended regular expressions
|
||||||
function _bash-it-egrep() {
|
function _bash-it-egrep() {
|
||||||
: "${BASH_IT_GREP:=$(type -p egrep || type -p grep)}"
|
: "${BASH_IT_GREP:=$(type -P egrep || type -P grep)}"
|
||||||
"${BASH_IT_GREP:-/usr/bin/grep}" -E "$@"
|
"${BASH_IT_GREP:-/usr/bin/grep}" -E "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ function pj() {
|
|||||||
# with the same name in project directories
|
# with the same name in project directories
|
||||||
IFS=':' read -ra dests <<< "${BASH_IT_PROJECT_PATHS?${FUNCNAME[0]}: project working folders must be configured}"
|
IFS=':' read -ra dests <<< "${BASH_IT_PROJECT_PATHS?${FUNCNAME[0]}: project working folders must be configured}"
|
||||||
for d in "${!dests[@]}"; do
|
for d in "${!dests[@]}"; do
|
||||||
if [[ ! -d "${dests[d]}" ]]; then
|
if [[ ! -d "${dests[d]}/${proj}" ]]; then
|
||||||
unset 'dests[d]'
|
unset 'dests[d]'
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user