Compare commits
No commits in common. "0540dc0927e4477d2d299b604dd5680554baa474" and "632aeedefb3380e3753a6699fec0259346d6bbe1" have entirely different histories.
0540dc0927
...
632aeedefb
|
@ -2,7 +2,7 @@
|
||||||
title: Bashrc
|
title: Bashrc
|
||||||
description: Details about how I configure my shell
|
description: Details about how I configure my shell
|
||||||
published: true
|
published: true
|
||||||
date: 2024-03-09T03:22:52.743Z
|
date: 2024-03-08T00:01:02.134Z
|
||||||
tags:
|
tags:
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2024-03-07T23:21:44.989Z
|
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 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
|
[ -f ~/.bashrc ]( -f ~/.bashrc .md) && . ~/.bashrc
|
||||||
```
|
```
|
||||||
|
|
||||||
I also use `~/.bash_profile` for setting numlock while in a tty:
|
I also use `~/.bash_profile` for setting numlock while in a tty:
|
||||||
|
|
||||||
```bash
|
```
|
||||||
case $(tty) in /dev/tty[0-9]*)
|
case $(tty) in /dev/tty[0-9]*)
|
||||||
setleds -D +num * (numlock for X is set in ~/.xinitrc)
|
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.
|
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
|
# If not running interactively, don't do anything
|
||||||
[ $- != *i* ]( $- != *i* .md) && return
|
[ $- != *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.
|
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.
|
# If a directory is given without any command, CD into it.
|
||||||
shopt -s autocd
|
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.
|
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
|
for f in ~/.bashrc.d/*.bash; do source "$f"; done
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
---
|
---
|
||||||
title: Links of Infamy
|
title: "Links of Infamy"
|
||||||
description: A link dump of things I find truly amazing
|
description: "A link dump of things I find truly amazing"
|
||||||
published: true
|
author: "Thurstylark"
|
||||||
date: 2024-03-09T03:26:06.165Z
|
date: 2021-9-25
|
||||||
tags:
|
draft: false
|
||||||
editor: markdown
|
|
||||||
dateCreated: 2024-03-07T23:22:12.102Z
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
- [How to properly run a community.](https://wiki.archlinux.org/index.php/Code_of_conduct)
|
- [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 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)
|
- [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 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 answer useless questions that get asked repeatedly.](http://stackoverflow.com/a/1732454)
|
||||||
- [How to properly appreciate the number five.](https://github.com/jackdcrawford/five)
|
- [How to properly appreciate the number five.](https://github.com/jackdcrawford/five)
|
||||||
{.links-list}
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue