mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 14:28:02 +03:00
shel
This commit is contained in:
4 files changed
+40
-2
No files matched your search
@@ -0,0 +1,38 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake.homeModules.home-nushell-bash-compat =
|
||||
{ ... }:
|
||||
{
|
||||
programs.nushell.extraConfig = ''
|
||||
$env.DIRSTACK = []
|
||||
def --env pushd [path: path] {
|
||||
$env.DIRSTACK = ($env.DIRSTACK | prepend $env.PWD)
|
||||
cd $path
|
||||
}
|
||||
|
||||
def --env popd [] {
|
||||
if ($env.DIRSTACK | is-empty) {
|
||||
print $"(ansi red)popd: directory stack empty(ansi reset)"
|
||||
} else {
|
||||
let top = ($env.DIRSTACK | first)
|
||||
$env.DIRSTACK = ($env.DIRSTACK | skip 1)
|
||||
cd $top
|
||||
}
|
||||
}
|
||||
|
||||
def dirs [] {
|
||||
[$env.PWD] | append $env.DIRSTACK
|
||||
}
|
||||
|
||||
def bashc [command: string] {
|
||||
^bash -lc $command
|
||||
}
|
||||
|
||||
def rerun [] {
|
||||
let last = (history | last | get command)
|
||||
print $"(ansi grey)$ ($last)(ansi reset)"
|
||||
^bash -lc $last
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
flake.homeModules.home-zsh =
|
||||
{ ... }:
|
||||
{
|
||||
# TODO nu
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
@@ -18,7 +17,6 @@
|
||||
alias la='eza -a --icons --group-directories-first'
|
||||
alias lt='eza --tree --level=2 --icons'
|
||||
|
||||
alias cd='z'
|
||||
alias cat='bat'
|
||||
alias grep='grep --color=auto'
|
||||
alias df='df -h'
|
||||
|
||||
Reference in new issue
Block a user