mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 08:45:39 +00:00
fish abbreviations
This commit is contained in:
parent
634e8cabac
commit
b111045ab4
113
nixos/home.nix
113
nixos/home.nix
@ -22,7 +22,6 @@ in
|
||||
sd
|
||||
jq
|
||||
tealdeer
|
||||
zoxide
|
||||
unstable._1password-gui
|
||||
];
|
||||
|
||||
@ -60,6 +59,112 @@ in
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
functions = {};
|
||||
interactiveShellInit = "";
|
||||
loginShellInit = "";
|
||||
shellAbbrs = {
|
||||
|
||||
# Directory aliases
|
||||
l = "ls";
|
||||
lh = "ls -lh";
|
||||
ll = "ls -alhF";
|
||||
lf = "ls -lh | fzf";
|
||||
c = "cd";
|
||||
# -- - = "cd -";
|
||||
mkd = "mkdir -pv";
|
||||
|
||||
# Tmux
|
||||
ta = "tmux attach-session";
|
||||
tan = "tmux attach-session -t noah";
|
||||
tnn = "tmux new-session -s noah";
|
||||
|
||||
# Git
|
||||
g = "git";
|
||||
gs = "git status";
|
||||
gd = "git diff";
|
||||
gds = "git diff --staged";
|
||||
gdp = "git diff HEAD^";
|
||||
ga = "git add";
|
||||
gaa = "git add -A";
|
||||
gac = "git commit -am";
|
||||
gc = "git commit -m";
|
||||
gca = "git commit --amend";
|
||||
gu = "git pull";
|
||||
gp = "git push";
|
||||
gpp = "git_set_upstream";
|
||||
gl = "git log --graph --decorate --oneline -20";
|
||||
gll = "git log --graph --decorate --oneline";
|
||||
gco = "git checkout";
|
||||
gcom = "git switch master";
|
||||
gcob = "git switch -c";
|
||||
gb = "git branch";
|
||||
gbd = "git branch -d";
|
||||
gbD = "git branch -D";
|
||||
gr = "git reset";
|
||||
grh = "git reset --hard";
|
||||
gm = "git merge";
|
||||
gcp = "git cherry-pick";
|
||||
cdg = "cd (git rev-parse --show-toplevel)";
|
||||
|
||||
# GitHub
|
||||
ghr = "gh repo view -w";
|
||||
gha = "gh run list | head -1 | awk \'{ print $(NF-2) }\' | xargs gh run view";
|
||||
grw = "gh run watch";
|
||||
grf = "gh run view --log-failed";
|
||||
grl = "gh run view --log";
|
||||
|
||||
# Vim
|
||||
v = "vim";
|
||||
vl = "vim -c 'normal! `0'";
|
||||
vll = "vim -c 'Hist'";
|
||||
|
||||
# Notes
|
||||
qn = "quicknote";
|
||||
sn = "syncnotes";
|
||||
to = "today";
|
||||
work = "vim $NOTES_PATH/work.md";
|
||||
|
||||
# Improved CLI Tools
|
||||
cat = "bat"; # Swap cat with bat
|
||||
h = "http -Fh --all"; # Curl site for headers
|
||||
|
||||
# Fun CLI Tools
|
||||
weather = "curl wttr.in/$WEATHER_CITY";
|
||||
moon = "curl wttr.in/Moon";
|
||||
|
||||
# Cheat Sheets
|
||||
ssl = "openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr";
|
||||
fingerprint = "ssh-keyscan myhost.com | ssh-keygen -lf -";
|
||||
publickey = "ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub";
|
||||
forloop = "for i in (seq 1 100)";
|
||||
|
||||
# Docker
|
||||
dc = "$DOTS/bin/docker_cleanup";
|
||||
dr = "docker run --rm -it";
|
||||
db = "docker build . -t";
|
||||
|
||||
# Terraform
|
||||
te = "terraform";
|
||||
|
||||
# Kubernetes
|
||||
k = "kubectl";
|
||||
pods = "kubectl get pods -A";
|
||||
nodes = "kubectl get nodes";
|
||||
deploys = "kubectl get deployments -A";
|
||||
dash = "kube-dashboard";
|
||||
ks = "k9s";
|
||||
|
||||
# Python
|
||||
py = "python";
|
||||
po = "poetry";
|
||||
pr = "poetry run python";
|
||||
|
||||
# Rust
|
||||
ca = "cargo";
|
||||
|
||||
};
|
||||
shellAliases = {};
|
||||
shellInit = "";
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
@ -76,6 +181,11 @@ in
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
# Other configs
|
||||
xdg.configFile = {
|
||||
"starship.toml".source = ../starship/starship.toml.configlink;
|
||||
@ -131,6 +241,7 @@ in
|
||||
extraPackages = with pkgs; [
|
||||
nodePackages.pyright
|
||||
rust-analyzer
|
||||
terraform-ls
|
||||
];
|
||||
extraConfig = ''
|
||||
lua << EOF
|
||||
|
Loading…
Reference in New Issue
Block a user