AutoYADM commit: 2025-04-16 19:30:12
This commit is contained in:
parent
6afc52c6bf
commit
ba256e3495
1 changed files with 11 additions and 0 deletions
11
.config/fish/functions/cd.fish
Normal file
11
.config/fish/functions/cd.fish
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Defined via `source`
|
||||||
|
function cd --wraps=cd --description "Change directory. No args goes to git root or $HOME."
|
||||||
|
set -l cdfunc /usr/share/fish/functions/cd.fish
|
||||||
|
if test (count $argv) -ne 0; or not git rev-parse --is-inside-work-tree &>/dev/null
|
||||||
|
source $cdfunc
|
||||||
|
cd $argv
|
||||||
|
else
|
||||||
|
source $cdfunc
|
||||||
|
cd (git rev-parse --show-toplevel)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue