Pi66

walrs
pywal but if its Fast-Minimal-Simple
git clone https://git.pi66.xyz/walrs

← back to log

fix some bugs

author: pixel2175
date: 2025-06-04 02:58
hash: 87beb30a48a61f30b777bd78de540585c96e027f

Diffstat:

M

autocomplete.sh
23 ++++++++++--------------------
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
diff --git a/autocomplete.sh b/autocomplete.sh
index 8593116..1699d6f 100755
--- a/autocomplete.sh
+++ b/autocomplete.sh
@@ -5,16 +5,9 @@

 set -e

-# Colors
-GREEN='\033[0;32m'
-RED='\033[0;31m'
-YELLOW='\033[1;33m'
-NC='\033[0m'
-
-
 # Check if walrs exists
 if ! command -v walrs &> /dev/null; then
-    echo -e "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mrow><mi>R</mi><mi>E</mi><mi>D</mi></mrow><mi>E</mi><mi>r</mi><mi>r</mi><mi>o</mi><mi>r</mi><mi>:</mi><mi>w</mi><mi>a</mi><mi>l</mi><mi>r</mi><mi>s</mi><mi>n</mi><mi>o</mi><mi>t</mi><mi>f</mi><mi>o</mi><mi>u</mi><mi>n</mi><mi>d</mi><mi>i</mi><mi>n</mi><mi>P</mi><mi>A</mi><mi>T</mi><mi>H</mi></mrow></math>{NC}"
+    echo -e "Error: walrs not found in PATH$"
     exit 1
 fi

@@ -57,7 +50,7 @@ for i in (seq -128 127)
 end
 EOF

-        echo -e "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mrow><mi>G</mi><mi>R</mi><mi>E</mi><mi>E</mi><mi>N</mi></mrow><mi>F</mi><mi>i</mi><mi>s</mi><mi>h</mi><mi>c</mi><mi>o</mi><mi>m</mi><mi>p</mi><mi>l</mi><mi>e</mi><mi>t</mi><mi>i</mi><mi>o</mi><mi>n</mi><mi>i</mi><mi>n</mi><mi>s</mi><mi>t</mi><mi>a</mi><mi>l</mi><mi>l</mi><mi>e</mi><mi>d</mi><mi>t</mi><mi>o</mi><mi>:</mi><mtext>&#x000A0;</mtext><mo>&#x0002F;</mo><mo>&#x0002E;</mo><mi>c</mi><mi>o</mi><mi>n</mi><mi>f</mi><mi>i</mi><mi>g</mi><mo>&#x0002F;</mo><mi>f</mi><mi>i</mi><mi>s</mi><mi>h</mi><mo>&#x0002F;</mo><mi>c</mi><mi>o</mi><mi>m</mi><mi>p</mi><mi>l</mi><mi>e</mi><mi>t</mi><mi>i</mi><mi>o</mi><mi>n</mi><mi>s</mi><mo>&#x0002F;</mo><mi>w</mi><mi>a</mi><mi>l</mi><mi>r</mi><mi>s</mi><mo>&#x0002E;</mo><mi>f</mi><mi>i</mi><mi>s</mi><mi>h</mi></mrow></math>{NC}"
+        echo -e "Fish completion installed to: ~/.config/fish/completions/walrs.fish"
         ;;

     "zsh")
@@ -94,11 +87,11 @@ EOF
         # Add to fpath in .zshrc if not already there
         if ! grep -q "fpath=(.*\.zsh/completions" ~/.zshrc 2>/dev/null; then
             echo 'fpath=(~/.zsh/completions $fpath)' >> ~/.zshrc
-            echo -e "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mrow><mi>G</mi><mi>R</mi><mi>E</mi><mi>E</mi><mi>N</mi></mrow><mi>A</mi><mi>d</mi><mi>d</mi><mi>e</mi><mi>d</mi><mtext>&#x000A0;</mtext><mo>&#x0002F;</mo><mo>&#x0002E;</mo><mi>z</mi><mi>s</mi><mi>h</mi><mo>&#x0002F;</mo><mi>c</mi><mi>o</mi><mi>m</mi><mi>p</mi><mi>l</mi><mi>e</mi><mi>t</mi><mi>i</mi><mi>o</mi><mi>n</mi><mi>s</mi><mi>t</mi><mi>o</mi><mi>f</mi><mi>p</mi><mi>a</mi><mi>t</mi><mi>h</mi><mi>i</mi><mi>n</mi><mtext>&#x000A0;</mtext><mo>&#x0002F;</mo><mo>&#x0002E;</mo><mi>z</mi><mi>s</mi><mi>h</mi><mi>r</mi><mi>c</mi></mrow></math>{NC}"
+            echo -e "Added ~/.zsh/completions to fpath in ~/.zshrc"
         fi

-        echo -e "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mrow><mi>G</mi><mi>R</mi><mi>E</mi><mi>E</mi><mi>N</mi></mrow><mi>Z</mi><mi>s</mi><mi>h</mi><mi>c</mi><mi>o</mi><mi>m</mi><mi>p</mi><mi>l</mi><mi>e</mi><mi>t</mi><mi>i</mi><mi>o</mi><mi>n</mi><mi>i</mi><mi>n</mi><mi>s</mi><mi>t</mi><mi>a</mi><mi>l</mi><mi>l</mi><mi>e</mi><mi>d</mi><mi>t</mi><mi>o</mi><mi>:</mi><mtext>&#x000A0;</mtext><mo>&#x0002F;</mo><mo>&#x0002E;</mo><mi>z</mi><mi>s</mi><mi>h</mi><mo>&#x0002F;</mo><mi>c</mi><mi>o</mi><mi>m</mi><mi>p</mi><mi>l</mi><mi>e</mi><mi>t</mi><mi>i</mi><mi>o</mi><mi>n</mi><mi>s</mi><msub><mo>&#x0002F;</mo><mi>w</mi></msub><mi>a</mi><mi>l</mi><mi>r</mi><mi>s</mi></mrow></math>{NC}"
-        echo -e "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mrow><mi>Y</mi><mi>E</mi><mi>L</mi><mi>L</mi><mi>O</mi><mi>W</mi></mrow><mi>R</mi><mi>e</mi><mi>s</mi><mi>t</mi><mi>a</mi><mi>r</mi><mi>t</mi><mi>z</mi><mi>s</mi><mi>h</mi><mi>o</mi><mi>r</mi><mi>r</mi><mi>u</mi><mi>n</mi><mi>:</mi><mi>s</mi><mi>o</mi><mi>u</mi><mi>r</mi><mi>c</mi><mi>e</mi><mtext>&#x000A0;</mtext><mo>&#x0002F;</mo><mo>&#x0002E;</mo><mi>z</mi><mi>s</mi><mi>h</mi><mi>r</mi><mi>c</mi><mi>&</mi><mi>&</mi><mi>c</mi><mi>o</mi><mi>m</mi><mi>p</mi><mi>i</mi><mi>n</mi><mi>i</mi><mi>t</mi></mrow></math>{NC}"
+        echo -e "Zsh completion installed to: ~/.zsh/completions/_walrs"
+        echo -e "Restart zsh or run: source ~/.zshrc && compinit"
         ;;

     "bash")
@@ -159,12 +152,12 @@ EOF


         echo "source ~/.local/share/bash-completion/completions/walrs" >> ~/.bashrc
-        echo -e "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mrow><mi>G</mi><mi>R</mi><mi>E</mi><mi>E</mi><mi>N</mi></mrow><mi>B</mi><mi>a</mi><mi>s</mi><mi>h</mi><mi>c</mi><mi>o</mi><mi>m</mi><mi>p</mi><mi>l</mi><mi>e</mi><mi>t</mi><mi>i</mi><mi>o</mi><mi>n</mi><mi>i</mi><mi>n</mi><mi>s</mi><mi>t</mi><mi>a</mi><mi>l</mi><mi>l</mi><mi>e</mi><mi>d</mi><mi>t</mi><mi>o</mi><mi>:</mi></mrow></math>COMPLETION_DIR/walrs${NC}"
+        echo -e "Bash completion installed to: <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mi>C</mi><mi>O</mi><mi>M</mi><mi>P</mi><mi>L</mi><mi>E</mi><mi>T</mi><mi>I</mi><mi>O</mi><msub><mi>N</mi><mi>D</mi></msub><mi>I</mi><mi>R</mi><mo>&#x0002F;</mo><mi>w</mi><mi>a</mi><mi>l</mi><mi>r</mi><mi>s</mi></mrow></math>"
         ;;

     *)
-        echo -e "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mrow><mi>R</mi><mi>E</mi><mi>D</mi></mrow><mi>U</mi><mi>n</mi><mi>s</mi><mi>u</mi><mi>p</mi><mi>p</mi><mi>o</mi><mi>r</mi><mi>t</mi><mi>e</mi><mi>d</mi><mi>s</mi><mi>h</mi><mi>e</mi><mi>l</mi><mi>l</mi><mi>:</mi></mrow></math>CURRENT_SHELL${NC}"
-        echo -e "<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mrow><mrow><mi>Y</mi><mi>E</mi><mi>L</mi><mi>L</mi><mi>O</mi><mi>W</mi></mrow><mi>S</mi><mi>u</mi><mi>p</mi><mi>p</mi><mi>o</mi><mi>r</mi><mi>t</mi><mi>e</mi><mi>d</mi><mi>s</mi><mi>h</mi><mi>e</mi><mi>l</mi><mi>l</mi><mi>s</mi><mi>:</mi><mi>f</mi><mi>i</mi><mi>s</mi><mi>h</mi><mo>&#x0002C;</mo><mi>z</mi><mi>s</mi><mi>h</mi><mo>&#x0002C;</mo><mi>b</mi><mi>a</mi><mi>s</mi><mi>h</mi></mrow></math>{NC}"
+        echo -e "Unsupported shell: $CURRENT_SHELL"
+        echo -e "Supported shells: fish, zsh, bash"
         exit 1
         ;;
 esac