Skip to content

Commit 1e273f8

Browse files
committed
comments
1 parent 5ac1943 commit 1e273f8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bemenu-qalc.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@
1717
#
1818
#########################
1919

20+
# bemenu-qalc does not use any arguments
21+
22+
# file operations history with results
2023
history_file="$HOME/.local/state/bemenu-qalc-history.txt"
21-
keybindings=""
2224

25+
# bemenu keybindings, defaults and vim mode
2326
define(){ IFS=$'\n' read -r -d '' "${1}" || true; }
27+
keybindings=""
2428
define keybindings <<- 'HEREDOC'
2529
# bemenu-qalc starts in insert mode
2630
Left INSR: Move cursor left
@@ -105,6 +109,7 @@ HEREDOC
105109
help=""
106110
answer=""
107111

112+
# create a list: last opération + header menu + history
108113
get_history() {
109114
if [[ -n "$help" ]]; then
110115
echo -e "󰜉 return"
@@ -125,7 +130,7 @@ get_history() {
125130

126131
while
127132
input=$(get_history | bemenu -p "  = $answer ")
128-
[[ -n "$input" ]]
133+
[[ -n "$input" ]] # exit if bemenu quit
129134
do
130135
if [[ "$input" =~ clear$|return$|found$ ]]; then
131136
answer=""

0 commit comments

Comments
 (0)