fixed merge conflicts from random newlines in index.md(html)
This commit is contained in:
commit
7ea5d7109a
@ -18,6 +18,12 @@
|
||||
<strong><a href="https://gitlab.com/AlejandroS/shockrah-city">Site Source Code</a></strong></p>
|
||||
</blockquote>
|
||||
<hr />
|
||||
<h3 id="bash-is-weird-sometimes"><strong><a href="./post/bash-1.html">Bash is weird sometimes</a></strong></h3>
|
||||
<blockquote>
|
||||
<em>July 22, 2018</em><br />
|
||||
My terminal experience is gettin really weird...<br />
|
||||
More deets coming after this post about that<br />
|
||||
</blockquote>
|
||||
<h3 id="qutebrowser-is-comfy"><strong><a href="./post/qute.html">QuteBrowser is /comfy/</a></strong></h3>
|
||||
<blockquote>
|
||||
<em>July 2, 2018</em><br />
|
||||
|
6
index.md
6
index.md
@ -10,6 +10,12 @@
|
||||
|
||||
------
|
||||
|
||||
=======
|
||||
### **[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! \
|
||||
|
35
markdown/post/bash-1.md
Normal file
35
markdown/post/bash-1.md
Normal file
@ -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\<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 🤷.
|
35
post/bash-1.html
Normal file
35
post/bash-1.html
Normal file
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<title></title>
|
||||
<style type="text/css">code{white-space: pre;}</style>
|
||||
<link rel="stylesheet" href="bstyle.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="../index.html"><img src="../img/banner.png" alt="Homepage" /></a></p>
|
||||
<h1 id="bash-is-weird-sometimes">Bash is weird sometimes</h1>
|
||||
<p>Bash is actually pretty nice but is... weird sometimes.<br />
|
||||
Take this for instance: <code>alias v='vim'</code> 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:</p>
|
||||
<blockquote>
|
||||
<p>vim myFi<tab><br />
|
||||
cd: too many arguments<br />
|
||||
bash: cd: too many arguments</p>
|
||||
</blockquote>
|
||||
<p>As fun as that is to deal with(<em>it's not</em>) apparantly that bind I mentioned earlier fixes this issue completely.<br />
|
||||
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.<br />
|
||||
Just use that alias in your bashrc and you're good to go.</p>
|
||||
<h2 id="rambled-guess-time">Rambled guess time</h2>
|
||||
<p>My guess on how the alias is that bash doesn't try to figure out that you want to use <code>vim</code> since you've only typed a single <code>v</code> in this case; therefore tab-completion would go unnoticed?<br />
|
||||
Say you had a directory with files:<br />
|
||||
> first<br />
|
||||
> second<br />
|
||||
> third<br />
|
||||
That would mean if your shell contained <code>asdf</code>. 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.</p>
|
||||
<h3 id="where-be-the-posts">Where be the posts</h3>
|
||||
<p>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.<br />
|
||||
Specifically it's looking into <em>GCC</em>'s seemingly random behavior with switch cases. Essentially <em>GCC</em> will sometimes create a decision tree for a slightly faster search time through the cases, sometimes create the equivalent of linearly executable code(<em>like a bunch of if/else's</em>), and if given the opportunity "<em>guess</em>" 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 🤷.</p>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user