AutoYADM commit: 2025-02-24 14:45:12
This commit is contained in:
parent
5eae3f87cd
commit
a558358172
1 changed files with 6 additions and 11 deletions
17
.zshrc
17
.zshrc
|
@ -146,19 +146,14 @@ function viewport_osc() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function mksh() {
|
function mksh() {
|
||||||
local path="$1.sh"
|
local filepath="$1.sh"
|
||||||
if [[ /usr/bin/pathchk -p -P "$path" && "$path" != "" ]]; then
|
if [[ ! -f "$filepath" && "$1" != "" ]]; then
|
||||||
echo "test"
|
echo '#!/bin/env bash\n\necho "Hello, World!"' >>"$filepath"
|
||||||
|
/usr/bin/chmod +x "$filepath"
|
||||||
|
echo "$filepath created."
|
||||||
else
|
else
|
||||||
echo "else"
|
echo "$filepath already exists or is invalid."
|
||||||
fi
|
fi
|
||||||
# if [[ ! -f "$path" ]]; then
|
|
||||||
# echo '#!/bin/env bash\n\necho "Hello, World!"' >>"$path"
|
|
||||||
# /usr/bin/chmod +x "$path"
|
|
||||||
# echo "$path created."
|
|
||||||
# else
|
|
||||||
# echo "$path already exists."
|
|
||||||
# fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# precmd_functions+=(set_win_title viewport_osc)
|
# precmd_functions+=(set_win_title viewport_osc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue