feat: CLASSIFICATION function-header field + shadow-classification lint #163

Merged
rootiest merged 7 commits from feat/classification-header-field into main 2026-09-22 02:12:58 +00:00
2 changed files with 12 additions and 12 deletions
Showing only changes of commit 373917d002 - Show all commits
+2 -2
View File
@@ -5,7 +5,7 @@
# 01-file-and-directory # 01-file-and-directory
# #
# CLASSIFICATION # CLASSIFICATION
# uses-shadow(cd) # bypasses-shadow(cd)
# #
# SYNOPSIS # SYNOPSIS
# mkcd [-s | --silent] <dir> # mkcd [-s | --silent] <dir>
@@ -68,7 +68,7 @@ function mkcd --description 'Create a directory (with parents) and cd into it'
_fish_mkdir_p --tree $dir; or return $status _fish_mkdir_p --tree $dir; or return $status
end end
cd $dir builtin cd $dir
or return $status or return $status
if test $is_new -eq 1 if test $is_new -eq 1
+10 -10
View File
@@ -10,7 +10,7 @@
# _mkrep_repo_exists, git # _mkrep_repo_exists, git
# #
# CLASSIFICATION # CLASSIFICATION
# uses-shadow(cd), destructive, network # bypasses-shadow(cd), destructive, network
# #
# SYNOPSIS # SYNOPSIS
# mkrep [--cd | --no-cd] [--mkdir | --no-mkdir] [--git | --no-git] # mkrep [--cd | --no-cd] [--mkdir | --no-mkdir] [--git | --no-git]
@@ -307,7 +307,7 @@ function mkrep --description 'Create a directory, cd into it, and git init it'
_mkrep_say $silent "$c_warn""→$c_reset $c_arg$dir$c_reset already exists" _mkrep_say $silent "$c_warn""→$c_reset $c_arg$dir$c_reset already exists"
end end
cd $dir builtin cd $dir
or begin or begin
echo "$c_err""✘$c_reset Failed to enter $c_arg$dir$c_reset" >&2 echo "$c_err""✘$c_reset Failed to enter $c_arg$dir$c_reset" >&2
return 1 return 1
@@ -329,7 +329,7 @@ function mkrep --description 'Create a directory, cd into it, and git init it'
end end
or begin or begin
echo "$c_err""✘$c_reset git init failed in $c_arg$dir$c_reset" >&2 echo "$c_err""✘$c_reset git init failed in $c_arg$dir$c_reset" >&2
cd $orig_pwd builtin cd $orig_pwd
return 1 return 1
end end
@@ -344,7 +344,7 @@ function mkrep --description 'Create a directory, cd into it, and git init it'
_mkrep_verbose $silent $verbose "$c_dim""Running: git remote add origin $_flag_remote$c_reset" _mkrep_verbose $silent $verbose "$c_dim""Running: git remote add origin $_flag_remote$c_reset"
_mkrep_add_origin $silent $_flag_remote _mkrep_add_origin $silent $_flag_remote
or begin or begin
cd $orig_pwd builtin cd $orig_pwd
return 1 return 1
end end
end end
@@ -354,7 +354,7 @@ function mkrep --description 'Create a directory, cd into it, and git init it'
test -z "$cmd"; and set cmd $MKREP_REMOTE_CMD test -z "$cmd"; and set cmd $MKREP_REMOTE_CMD
if test -z "$cmd" if test -z "$cmd"
echo "$c_err""✘$c_reset --new-remote given no command and \$MKREP_REMOTE_CMD is unset" >&2 echo "$c_err""✘$c_reset --new-remote given no command and \$MKREP_REMOTE_CMD is unset" >&2
cd $orig_pwd builtin cd $orig_pwd
return 1 return 1
end end
@@ -371,7 +371,7 @@ function mkrep --description 'Create a directory, cd into it, and git init it'
end end
or begin or begin
echo "$c_err""✘$c_reset Remote-create command failed" >&2 echo "$c_err""✘$c_reset Remote-create command failed" >&2
cd $orig_pwd builtin cd $orig_pwd
return 1 return 1
end end
_mkrep_say $silent "$c_ok""✔$c_reset Ran remote-create command" _mkrep_say $silent "$c_ok""✔$c_reset Ran remote-create command"
@@ -393,7 +393,7 @@ function mkrep --description 'Create a directory, cd into it, and git init it'
_mkrep_say $silent "$c_warn""→$c_reset $c_arg$USER/$name$c_reset already exists on $srv_type; linking instead of creating" _mkrep_say $silent "$c_warn""→$c_reset $c_arg$USER/$name$c_reset already exists on $srv_type; linking instead of creating"
_mkrep_add_origin $silent $url _mkrep_add_origin $silent $url
or begin or begin
cd $orig_pwd builtin cd $orig_pwd
return 1 return 1
end end
else else
@@ -424,7 +424,7 @@ function mkrep --description 'Create a directory, cd into it, and git init it'
if string match -q '*{server}*' -- $cmd if string match -q '*{server}*' -- $cmd
if test -z "$srv_url" if test -z "$srv_url"
echo "$c_err""✘$c_reset No base URL resolved for $srv_type (set \$GITEA_URL/\$GITEA_HOST or \$GITLAB_URL/\$GITLAB_HOST)" >&2 echo "$c_err""✘$c_reset No base URL resolved for $srv_type (set \$GITEA_URL/\$GITEA_HOST or \$GITLAB_URL/\$GITLAB_HOST)" >&2
cd $orig_pwd builtin cd $orig_pwd
return 1 return 1
end end
set cmd (string replace -a '{server}' $srv_url -- $cmd) set cmd (string replace -a '{server}' $srv_url -- $cmd)
@@ -440,7 +440,7 @@ function mkrep --description 'Create a directory, cd into it, and git init it'
end end
or begin or begin
echo "$c_err""✘$c_reset Remote-create command failed" >&2 echo "$c_err""✘$c_reset Remote-create command failed" >&2
cd $orig_pwd builtin cd $orig_pwd
return 1 return 1
end end
set -l url (_mkrep_remote_url $srv_type $USER $name $srv_url) set -l url (_mkrep_remote_url $srv_type $USER $name $srv_url)
@@ -451,7 +451,7 @@ function mkrep --description 'Create a directory, cd into it, and git init it'
end end
if test $do_cd -eq 0 if test $do_cd -eq 0
cd $orig_pwd builtin cd $orig_pwd
else else
_mkrep_say $silent "$c_ok""✔$c_reset Entered $c_arg$dir$c_reset" _mkrep_say $silent "$c_ok""✔$c_reset Entered $c_arg$dir$c_reset"
end end