From c258e7f2ea88151fa7da1bb7234b8b6a0429b591 Mon Sep 17 00:00:00 2001
From: AlejandroS
+July 22, 2018+
+My terminal experience is gettin really weird...
+More deets coming after this post about that
+ +
July 2, 2018
Operating at peak comfy levels captain!
diff --git a/index.md b/index.md index 080d0ba..71d0f47 100644 --- a/index.md +++ b/index.md @@ -10,7 +10,12 @@ ------ -### **[QuteBrowser is /comfy/](.poset/qute.html)** +### **[Bash is weird sometimes](./post/bash-1.html)** +> _July 22, 2018_ \ +> My terminal experience is gettin really weird... \ +> More deets coming after this post about that \ + +### **[QuteBrowser is /comfy/](./post/qute.html)** > _July 2, 2018_ \ > Operating at peak comfy levels captain! \ diff --git a/markdown/post/bash-1.md b/markdown/post/bash-1.md new file mode 100644 index 0000000..93193b1 --- /dev/null +++ b/markdown/post/bash-1.md @@ -0,0 +1,35 @@ +[![Homepage](../img/banner.png)](../index.html) + + +# Bash is weird sometimes + +Bash is actually pretty nice but is... weird sometimes. \ +Take this for instance: `alias v='vim'` +This is an actual bind I use daily however if you don't have tab-completion setup for vim you know that tab-completion usually results in: + +> vim myFi\\ +> cd: too many arguments\ +> bash: cd: too many arguments + +As fun as that is to deal with(_it's not_) apparantly that bind I mentioned earlier fixes this issue completely. \ +I'm not really sure why that works, but I'm just glad it does. +If you've ever needed a way of allowing for tab-completion with vim now you have one. \ +Just use that alias in your bashrc and you're good to go. + + +## Rambled guess time + +My guess on how the alias is that bash doesn't try to figure out that you want to use `vim` since you've only typed a single `v` in this case; therefore tab-completion would go unnoticed?\ +Say you had a directory with files: \ +> first \ +> second \ +> third \ +That would mean if your shell contained `asdf`. You could go to the first character start typing any one of those file names and have bash guess the filename to autocomplete, since it only look backwards for completion. + +### Where be the posts + +Lately I've been working on a translator for html. Similar to how pandoc turns markdown into valid html which lead me onto another issue that I've also taken on since I've not much to do. \ +Specifically it's looking into _GCC_'s seemingly random behavior with switch cases. +Essentially _GCC_ will sometimes create a decision tree for a slightly faster search time through the cases, sometimes create the equivalent of linearly executable code(_like a bunch of if/else's_), and if given the opportunity "_guess_" the correct case on the first check... +For that reason I've started diving into it to try and determine what the fug is going with this compiler and what flags, if any can be used to create some more predictable output. +Hopefully the research crops up something interesting to think but who knows 🤷. diff --git a/post/bash-1.html b/post/bash-1.html new file mode 100644 index 0000000..92ca09e --- /dev/null +++ b/post/bash-1.html @@ -0,0 +1,35 @@ + + + + + + + + + + + + + Bash is weird sometimes
+Bash is actually pretty nice but is... weird sometimes.
+
+Take this for instance:alias v='vim'
This is an actual bind I use daily however if you don't have tab-completion setup for vim you know that tab-completion usually results in:++vim myFi<tab>
+
+cd: too many arguments
+bash: cd: too many argumentsAs fun as that is to deal with(it's not) apparantly that bind I mentioned earlier fixes this issue completely.
+
+I'm not really sure why that works, but I'm just glad it does. If you've ever needed a way of allowing for tab-completion with vim now you have one.
+Just use that alias in your bashrc and you're good to go.Rambled guess time
+My guess on how the alias is that bash doesn't try to figure out that you want to use
+vim
since you've only typed a singlev
in this case; therefore tab-completion would go unnoticed?
+Say you had a directory with files:
+> first
+> second
+> third
+That would mean if your shell containedasdf
. You could go to the first character start typing any one of those file names and have bash guess the filename to autocomplete, since it only look backwards for completion.Where be the posts
+Lately I've been working on a translator for html. Similar to how pandoc turns markdown into valid html which lead me onto another issue that I've also taken on since I've not much to do.
+ +
+Specifically it's looking into GCC's seemingly random behavior with switch cases. Essentially GCC will sometimes create a decision tree for a slightly faster search time through the cases, sometimes create the equivalent of linearly executable code(like a bunch of if/else's), and if given the opportunity "guess" the correct case on the first check... For that reason I've started diving into it to try and determine what the fug is going with this compiler and what flags, if any can be used to create some more predictable output. Hopefully the research crops up something interesting to think but who knows 🤷.