diff --git a/home/user/.config/zsh/calculator b/home/user/.config/zsh/calculator index 57a6076..19ef42d 100644 --- a/home/user/.config/zsh/calculator +++ b/home/user/.config/zsh/calculator @@ -9,10 +9,10 @@ aliases[=]='noglob __calc' function accept-line() { - if [[ $BUFFER =~ '^[ ]?\(?[-+]?[0-9]+' ]]; then + if [[ $BUFFER =~ '^[ ]?\(?[-+]?[0-9]+[^a-zA-Z]+' ]]; then echo test "$BUFFER[1]" != " " && print -S -- "$BUFFER" # saving the command to history - __calc "$BUFFER" + __calc "$BUFFER" | sed 's/\.$//' BUFFER= fi zle .$WIDGET