AutoYADM commit: 2025-04-18 16:15:05

This commit is contained in:
Daniel Fichtinger 2025-04-18 16:15:05 -04:00
parent a6148ca5cd
commit 48354bfac3

View file

@ -7,14 +7,17 @@ function cd --wraps=cd --description "Change directory. No args goes to git root
argparse h/help -- $argv argparse h/help -- $argv
if set -q _flag_help if set -q _flag_help
echo smartcd.fish: Change directories, slightly smarter. echo smartcd.fish: Change directories, slightly smarter.
echo Invoke by running cd. Update with smartcd_update. echo Invoke by running cd. Update with smartcd_update.\n
echo Usage: echo Usage:
echo -h/--help: show this menu. echo -h/--help: show this menu.
echo cd [args]: behaves like normal cd. echo cd [args]: behaves like normal cd.
echo cd [no-args]: cd to ROOT. If at ROOT, cd to PREV.\n echo cd [no-args]: cd to ROOT. If at ROOT, cd to PREV.\n
echo ROOT = Git repo root '||' "\$HOME". echo ROOT = Git repo root '||' "\$HOME".
echo PREV = Last element of "\$dirprev". echo PREV = Last element of "\$dirprev".
echo If PREV is outside ROOT, user is prompted first. echo If PREV is outside ROOT, user is prompted first.\n
echo Author: Daniel Fichtinger '<daniel@ficd.ca>'
echo Upstream: https://git.sr.ht/~ficd/smartcd.fish
echo License: ISC
return 0 return 0
end end
# Skip history in subshells. # Skip history in subshells.
@ -58,9 +61,13 @@ end
function smartcd_update --description "Update smartcd.fish with the latest from the upstream." function smartcd_update --description "Update smartcd.fish with the latest from the upstream."
argparse h/help d/dry -- $argv argparse h/help d/dry -- $argv
if set -q _flag_help if set -q _flag_help
echo Update smartcd.fish with the latest from upstream. echo Update smartcd.fish with the latest from upstream.\n
echo Usage:
echo -d/--dry to not save the file. echo -d/--dry to not save the file.
echo -h/--help to print this screen. echo -h/--help to print this screen.\n
echo Author: Daniel Fichtinger '<daniel@ficd.ca>'
echo Upstream: https://git.sr.ht/~ficd/smartcd.fish
echo License: ISC
return 0 return 0
end end
set -l url https://git.sr.ht/~ficd/smartcd.fish/blob/main/smartcd.fish set -l url https://git.sr.ht/~ficd/smartcd.fish/blob/main/smartcd.fish