AutoYADM commit: 2025-04-18 14:30:05
This commit is contained in:
parent
276ae45d54
commit
653765c70b
1 changed files with 11 additions and 0 deletions
|
@ -7,6 +7,11 @@ if not functions -q __cd_orig
|
|||
end
|
||||
|
||||
function cd --wraps=cd --description "Change directory. No args goes to git root or $HOME. If already there, return to previous location."
|
||||
# Skip history in subshells.
|
||||
if status --is-command-substitution
|
||||
builtin cd $argv
|
||||
return $status
|
||||
end
|
||||
git rev-parse --is-inside-work-tree &>/dev/null
|
||||
set -l is_git $status
|
||||
if test (count $argv) -ne 0
|
||||
|
@ -24,3 +29,9 @@ function cd --wraps=cd --description "Change directory. No args goes to git root
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
function smartcd_update --description "Update smartcd.fish with the latest from the upstream."
|
||||
curl https://git.sr.ht/~ficd/smartcd.fish/blob/main/smartcd.fish \
|
||||
-o $fish_config/conf.d/smartcd.fish
|
||||
exec fish
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue