From c258e7f2ea88151fa7da1bb7234b8b6a0429b591 Mon Sep 17 00:00:00 2001 From: AlejandroS Date: Sun, 22 Jul 2018 00:29:04 -0700 Subject: [PATCH] Bash is weird post --- index.html | 9 ++++++++- index.md | 7 ++++++- markdown/post/bash-1.md | 35 +++++++++++++++++++++++++++++++++++ post/bash-1.html | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 markdown/post/bash-1.md create mode 100644 post/bash-1.html diff --git a/index.html b/index.html index d06e03f..a9462e8 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,14 @@ Site Source Code


-

QuteBrowser is /comfy/

+

Bash is weird sometimes

+
+July 22, 2018
+My terminal experience is gettin really weird...
+More deets coming after this post about that
+ +
+

QuteBrowser is /comfy/

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 @@ + + + + + + + + + + + +

Homepage

+

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 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 🤷.

+ +