mirror of
https://github.com/denisidoro/navi
synced 2024-11-24 20:43:06 +00:00
Fix linting (#30)
This commit is contained in:
parent
44c4d9551f
commit
0df4b9123d
5 changed files with 18 additions and 10 deletions
8
scripts/lint
Executable file
8
scripts/lint
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
export SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
find . -iname '*.sh' | xargs -I% dot code beautify %
|
||||
dot code beautify "${SCRIPT_DIR}/navi"
|
|
@ -32,5 +32,5 @@ cheat::from_selection() {
|
|||
done
|
||||
|
||||
echoerr "No valid cheatsheet!"
|
||||
exit 67
|
||||
exit 67
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ handler::preview() {
|
|||
|
||||
main() {
|
||||
case ${entry_point:-} in
|
||||
preview) handler::preview "$@" 2>/dev/null || echo "Unable to find command for '${query:-}'";;
|
||||
preview) handler::preview "$@" 2>/dev/null || echo "Unable to find command for '${query:-}'" ;;
|
||||
*) health::fzf && handler::main "$@" ;;
|
||||
esac
|
||||
}
|
|
@ -5,10 +5,10 @@ dep() {
|
|||
:
|
||||
}
|
||||
|
||||
command_exists () {
|
||||
type "$1" &> /dev/null
|
||||
command_exists() {
|
||||
type "$1" &> /dev/null
|
||||
}
|
||||
|
||||
echoerr() {
|
||||
echo "$@" 1>&2
|
||||
echoerr() {
|
||||
echo "$@" 1>&2
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ test::fail() {
|
|||
}
|
||||
|
||||
test::run() {
|
||||
echo
|
||||
echo "-> $1"
|
||||
shift
|
||||
eval "$*" && test::success || test::fail
|
||||
echo
|
||||
echo "-> $1"
|
||||
shift
|
||||
eval "$*" && test::success || test::fail
|
||||
}
|
Loading…
Reference in a new issue