Skip to content

Commit

Permalink
New Feat: show() #4
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalandy committed May 5, 2022
1 parent d1550e9 commit 8c20597
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 39 deletions.
44 changes: 19 additions & 25 deletions bashlava.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
#!/usr/bin/env bash

# See bashlava for all details https://github.com/firepress-org/bashlava
# Pinned: documentation ....... issue #11
# Pinned: logic & condition ... issue #10
# Pinned: bugs & fixes . ...... issue #9
# Pinned: UX Improvements ..... issue #8
# Pinned: TODO and backlog .... issue #4

# There are 14 TO-DO in the code
# Pinned issues https://github.com/firepress-org/bashlava/issues/11#issue-1226155001

# There are 0o0o TO-DO in the code

# TODO show()
# show() is work in progres. All about UX and prompt / case
# Show_All() .. prompt options
# sidecars
# alias
# examples
# User facing
# Condition
# Print
# Prompt
# App
# Core
# all function

# show() and helper function to find avail functions within bashlava.

# TODO edge()
# have this branch created with a unique ID to avoid conflicts with other developers edge_sunny
# prompt which name to use:
Expand Down Expand Up @@ -76,6 +62,15 @@
# The package is not installed
#fi

# TODO
# spell checker in comments, vs code extension ?

# TODO
# when the user goes into a prompt, he should be able to provide attri to avoid the pop-up.
# ex: ci yes, ci no
# ex: show app, show 3
# need to check if gh cli support this as well

# TODO release
# glitch, release function is not stable when we tag. Sometimes it show the older release
# loop with curl he check if Url is reachable
Expand Down Expand Up @@ -249,7 +244,7 @@ function tag { # User_
esac
}

function release {
function release { # User_
Condition_No_Commits_Pending
Condition_Attr_2_Must_Be_Empty

Expand Down Expand Up @@ -375,8 +370,7 @@ function help { # User_
}

function show { # User_
Prompt_All_Available_Fct #sidecars.sh
#Show_Version
Side_fct #sidecars.sh
}

function mdv { # User_
Expand All @@ -386,7 +380,7 @@ function mdv { # User_
function gitio { # User_

# CMD EXECUTION
function sub_short_url {
function child_gitio {
clear
curl -i https://git.io -F \
"url=https://github.com/${input_2}/${input_3}" \
Expand All @@ -407,7 +401,7 @@ function gitio { # User_
my_message="Do you want to continue? (y/n)" && Print_Gray
read -r user_input;
case ${user_input} in
y | Y) sub_short_url;;
y | Y) child_gitio;;
*) my_message="Aborted" && Print_Fatal;;
esac
}
Expand Down Expand Up @@ -538,7 +532,7 @@ function Print_Blue {
}

### Why do we have Print_Warning and Print_Warning_Stop here ?
# Fatal is usually reverse for unexpected erros within bashlava
# Fatal is usually reserve for unexpected error within bashlava
# Warning are expected - sometimes we want to stop the function, sometimes we want to continue
function Print_Warning {
_var_name="my_message" _is_it_empty="${my_message}" && Condition_Vars_Must_Be_Not_Empty
Expand Down
2 changes: 1 addition & 1 deletion components/sidecars.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

function Prompt_All_Available_Fct { #Side_
function Side_fct { #Side_
# when you code a fct, often you dont know by heart condition name
# help advanced
# it also helps me to see all functions at high level
Expand Down
42 changes: 29 additions & 13 deletions docs/prompt_show_fct.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
**Options:**

- `1`,`k` ..... show `Condition` fcts
- `2`,`k` ..... show `Print` fcts
- `3`,`k` ..... show `Prompt` fcts
- `4`,`k` ..... show `App` fcts
- `5`,`k` ..... show `Core` fcts
- `6`,`k` .... show `Sidecar` fcts
- `7`,`k` .... show `Alias` fcts
- `8`,`k` .... show `Examples` for fcts
- `9`,`k` .... show `User facing` fcts (shown via help)
- `a`,`f` ..... show `files` and sourced
- `b`,`fns` ... show files but not sourced
- `a` ......... show all functions
- `z` ... |`q`uit
- `1`,`al` ..... show `Alias` fcts
- `2`,`app` ..... show `App` fcts
- `3`,`cond` ..... show `Condition` fcts
- `4`,`core` ..... show `Core` fcts
- `5`,`ex` ..... show `Examples` fcts
- `6`,`p` .... show `Print` fcts
- `7`,`s` .... show `Sidecars` fcts
- `8`,`user` .... show `User facing` for fcts
- `9`,`all` .... show `All` fcts (shown via help)
- `f`, ..... show `files` (sourced or not sourced))
- `q` ......... |`q`uit

# Alias

# App

# Condition

# Core

# Examples

# Print

# Sidecars

# User facing

# All functions

0 comments on commit 8c20597

Please sign in to comment.