Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #29

Merged
merged 6 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/code/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"editor.defaultFormatter": "vscode.json-language-features"
},
// Python
"python.defaultInterpreterPath": "/Users/junyaokabe/.pyenv/versions/miniforge3-4.10.3-10/envs/Kaggle/bin/python",
"python.defaultInterpreterPath": "/Users/junyaokabe/.pyenv/versions/miniforge3-4.10.3-10/envs/CP/bin/python",
//
// GitHub Copilot
"github.copilot.enable": {
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
contents: read

jobs:
test:
shellcheck:
runs-on: ubuntu-latest

steps:
Expand All @@ -20,6 +20,5 @@ jobs:
- name: Differential ShellCheck
uses: redhat-plumbers-in-action/differential-shellcheck@v3
with:
ignored-codes: SC2148
severity: error
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2148
4 changes: 1 addition & 3 deletions .zsh/init/alias.zsh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# unix command aliases
alias la='lsd -a'
alias ll='lsd -l'
alias ls='lsd'
alias la='lsd -a'
alias rm='rm -i'
alias ..='cd ..'
alias ...='cd ../..'
Expand All @@ -11,8 +11,6 @@ alias q='exit'
alias :wq='exit'
alias pwdc='pwd | tr -d "\n" | pbcopy'

alias mysql.server stop='brew services stop mysql'

# glow (Markdown viewer)
alias -g mdpreview='glow -p -'

Expand Down
1 change: 1 addition & 0 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if [ -d $ZSH_INIT_DIR ] && [ -r $ZSH_INIT_DIR ] && [ -x $ZSH_INIT_DIR ]; then
fi

source "${FIG_DIR}/post.zsh"
source "${ZSH_INIT_DIR}/alias.zsh"

# Fig post block. Keep at the bottom of this file.
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
27 changes: 27 additions & 0 deletions script/find_alias.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from os import listdir, path


def main():
entry_path = "../"
suffix = (".sh", ".zsh", ".bash")
dir_stack = [entry_path]
while dir_stack:
dir = dir_stack.pop()
for file in listdir(dir):
if path.isdir(path.join(dir, file)):
dir_stack.append(path.join(dir, file))
elif file.endswith(suffix):
with open(path.join(dir, file), "r") as f:
tmp_alias = []
for line in f:
if line.startswith("alias "):
tmp_alias.append(line)
if tmp_alias:
print("---")
print("file name:", path.join(dir, file))
for line in tmp_alias:
print(line, end="")


if __name__ == "__main__":
main()