File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 17
17
#
18
18
# ########################
19
19
20
+ # bemenu-qalc does not use any arguments
21
+
22
+ # file operations history with results
20
23
history_file=" $HOME /.local/state/bemenu-qalc-history.txt"
21
- keybindings=" "
22
24
25
+ # bemenu keybindings, defaults and vim mode
23
26
define (){ IFS=$' \n ' read -r -d ' ' " ${1} " || true ; }
27
+ keybindings=" "
24
28
define keybindings << - 'HEREDOC '
25
29
# bemenu-qalc starts in insert mode
26
30
Left INSR: Move cursor left
@@ -105,6 +109,7 @@ HEREDOC
105
109
help=" "
106
110
answer=" "
107
111
112
+ # create a list: last opération + header menu + history
108
113
get_history () {
109
114
if [[ -n " $help " ]]; then
110
115
echo -e " return"
@@ -125,7 +130,7 @@ get_history() {
125
130
126
131
while
127
132
input=$( get_history | bemenu -p " = $answer " )
128
- [[ -n " $input " ]]
133
+ [[ -n " $input " ]] # exit if bemenu quit
129
134
do
130
135
if [[ " $input " =~ clear$| return$| found$ ]]; then
131
136
answer=" "
You can’t perform that action at this time.
0 commit comments