Compare commits

..

No commits in common. "0540dc0927e4477d2d299b604dd5680554baa474" and "632aeedefb3380e3753a6699fec0259346d6bbe1" have entirely different histories.

2 changed files with 13 additions and 14 deletions

View File

@ -2,7 +2,7 @@
title: Bashrc
description: Details about how I configure my shell
published: true
date: 2024-03-09T03:22:52.743Z
date: 2024-03-08T00:01:02.134Z
tags:
editor: markdown
dateCreated: 2024-03-07T23:21:44.989Z
@ -16,13 +16,13 @@ https://git.thurstylark.com/dotfiles/bashrc/src/branch/master/.bash_profile
Bash chooses which dotfile to source based on how it gets run. If starting from a login shell, `~/.bash_profile` will get sourced, but if there's not a command in there to source your `~/.bashrc`, you may find yourself having to `exec bash` after starting bash. This can be fixed by adding the following line to your `~/.bash_profile`:
```bash
```
[ -f ~/.bashrc ]( -f ~/.bashrc .md) && . ~/.bashrc
```
I also use `~/.bash_profile` for setting numlock while in a tty:
```bash
```
case $(tty) in /dev/tty[0-9]*)
setleds -D +num * (numlock for X is set in ~/.xinitrc)
;;
@ -43,21 +43,21 @@ I'm not going in to detail about every line, but I'll hilight the important part
First off, if we're not running bash interactively, there's no use for any of the rest of this, so just skip it.
```bash
```
# If not running interactively, don't do anything
[ $- != *i* ]( $- != *i* .md) && return
```
Another cool option is actually built in to bash: If you call for a directory without any command before it, just `cd` into that directory.
```bash
```
# If a directory is given without any command, CD into it.
shopt -s autocd
```
This is where all the other utilities, aliases, and functions get pulled in. Anything in `~/.bashrc.d/` ending in `.bash` will get pulled in.
```bash
```
for f in ~/.bashrc.d/*.bash; do source "$f"; done
```

View File

@ -1,13 +1,12 @@
---
title: Links of Infamy
description: A link dump of things I find truly amazing
published: true
date: 2024-03-09T03:26:06.165Z
tags:
editor: markdown
dateCreated: 2024-03-07T23:22:12.102Z
title: "Links of Infamy"
description: "A link dump of things I find truly amazing"
author: "Thurstylark"
date: 2021-9-25
draft: false
---
- [How to properly run a community.](https://wiki.archlinux.org/index.php/Code_of_conduct)
- [How to properly automate yourself out of a job.](https://github.com/NARKOZ/hacker-scripts)
- [How to properly file a bug report.](https://github.com/chrislgarry/Apollo-11/issues/3)
@ -17,5 +16,5 @@ dateCreated: 2024-03-07T23:22:12.102Z
- [How to properly install Gentoo](http://www.bash.org/?464385)
- [How to properly answer useless questions that get asked repeatedly.](http://stackoverflow.com/a/1732454)
- [How to properly appreciate the number five.](https://github.com/jackdcrawford/five)
{.links-list}