Skip to content

Commit

Permalink
Merge pull request #53 from hwixley/bugfix/no-ref/fix-mac-lib-class
Browse files Browse the repository at this point in the history
Bugfix/no ref/fix mac lib class
  • Loading branch information
hwixley committed Feb 19, 2024
2 parents 8141752 + 08e4de4 commit 256e3f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Binary file modified .generated/wyxcli-output-preview.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion argparse.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# CLI CONSTS
version="3.1.1"
version="3.1.2"
num_args=$#
date=$(date)
year="${date:24:29}"
Expand Down
12 changes: 8 additions & 4 deletions src/classes/lib/lib.class
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ lib.csv.query(){

lib.csv.query.one(){
lines=($(lib.csv.query "$1" "$2" "$3"))
echo "${lines[1]}"
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$(ps -o args= -p $$)" = *"zsh"* ]]; then
echo "${lines[2]}"
else
echo "${lines[1]}"
fi
}

lib.csv.all(){
Expand All @@ -40,11 +44,11 @@ lib.csv.all(){
if [ "$script" = "" ]; then
continue
fi
name=($(lib.csv.query 'arg_scripts' 'name' "where id='$script'"))
name=$(lib.csv.query.one 'arg_scripts' 'name' "where id='$script'")
if [ "$type" = "git" ]; then
echo "- \`$script\`: ${ORANGE}${name[1]}${RESET}"
echo "- \`$script\`: ${ORANGE}${name}${RESET}"
else
echo "- $script: ${ORANGE}${name[1]}${RESET}"
echo "- $script: ${ORANGE}${name}${RESET}"
fi
done
echo ""
Expand Down

0 comments on commit 256e3f8

Please sign in to comment.