Skip to content

Commit

Permalink
Extract common aliases as to bin bash
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jul 30, 2023
1 parent a910ffc commit 7d38b40
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 17 deletions.
7 changes: 0 additions & 7 deletions home/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
Expand Down Expand Up @@ -179,5 +174,3 @@ function set_win_title() {
starship_precmd_user_func="set_win_title"

eval "$(zoxide init bash)"

. "$XDG_CONFIG_HOME/homemade/.aliases.sh"
5 changes: 2 additions & 3 deletions home/.config/home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@
# Not under "starship/starship.toml"
xdg.configFile."starship.toml".source = ../starship.toml;

# I call "homemade" for own created tools
xdg.configFile."homemade/.aliases.sh".source = ../homemade/.aliases.sh;

# basic shell dotfiles should be put in ~/ except part of zsh files
home.file.".bashrc".source = ../../../home/.bashrc;
home.file.".bash_logout".source = ../../../home/.bash_logout;
Expand All @@ -152,6 +149,8 @@
# - Keep *.bash in shellscript naming in this repo for maintainability, the extname should be trimmed in the symlinks
xdg.dataFile."homemade/bin/bench_shells".source = ../../../home/.local/share/homemade/bin/bench_shells.bash;
xdg.dataFile."homemade/bin/updeps".source = ../../../home/.local/share/homemade/bin/updeps.bash;
xdg.dataFile."homemade/bin/la".source = ../../../home/.local/share/homemade/bin/la.bash;
xdg.dataFile."homemade/bin/zj".source = ../../../home/.local/share/homemade/bin/zj.bash;
home.sessionPath = [
"${config.xdg.dataHome}/homemade/bin"
];
Expand Down
5 changes: 0 additions & 5 deletions home/.config/homemade/.aliases.sh

This file was deleted.

2 changes: 0 additions & 2 deletions home/.config/zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ typeset -g HISTORY_SUBSTRING_SEARCH_FUZZY='true'
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

. "$XDG_CONFIG_HOME/homemade/.aliases.sh"

setopt correct
unsetopt BEEP
# These pickup disanling does not work...
Expand Down
3 changes: 3 additions & 0 deletions home/.local/share/homemade/bin/la.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

exa --long --all --group-directories-first "$@"
3 changes: 3 additions & 0 deletions home/.local/share/homemade/bin/zj.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

zellij attach "$(basename "$PWD")" || zellij --session "$(basename "$PWD")"

0 comments on commit 7d38b40

Please sign in to comment.