Skip to content

Instantly share code, notes, and snippets.

View alirz-pixel's full-sized avatar
📒

최문형 alirz-pixel

📒
  • 중앙대학교
View GitHub Profile
@alirz-pixel
alirz-pixel / Array Stack.c
Created March 19, 2022 02:18
스택 - 배열로 구현하기
#include <stdio.h>
#include <limits.h>
// [스택 정의]
#define STACKSIZE 10 // 스택에 넣을 수 있는 최대 갯수
int stack[STACKSIZE]; // 스택
int top = -1; // 인덱스 변수
// [사용자 정의 함수]
@alirz-pixel
alirz-pixel / .bashrc
Last active February 3, 2023 09:20
bash-completion example
# ~/.bashrc
_screen_complete() {
local width=$(bind -v | sed -n 's/^set completion-display-width //p')
if [[ $width -ne 0 ]]; then
bind "set completion-display-width 0"
PROMPT_COMMAND="bind 'set completion-display-width $width'"
fi
@alirz-pixel
alirz-pixel / .bashrc
Last active April 8, 2023 13:42
[shell] bash_completion
create_completion() {
local command=$1
local options=$2
local FILE_NAME=$3
local width=$(bind -v | sed -n 's/^set completion-display-width //p')
local func_name="_${command}_complete"
local func_body=
func_body+="if [[ $width -ne 0 ]]; then "