try

(★ 3,937)

모든 분위기에 맞는 새로운 디렉토리들

파일 탐색기

  • .gitignore
  • AGENTS.md
  • flake.lock
  • flake.nix
  • Gemfile
  • Gemfile.lock
  • LICENSE
  • Makefile
  • Rakefile
  • README.md
  • try-cli.gemspec
  • try.rb
  • VERSION

# 설치 가이드

ruby
사전 준비물

설치 및 실행 절차

gem install try-cli

RubyGems를 통해 try-cli를 설치합니다.

eval "$(try init)"

쉘 환경에 try 초기화 스크립트를 적용합니다.

핵심 명령어

try redis

실험 디렉토리를 탐색하거나 지정한 이름으로 새로 생성하여 이동합니다.

try new api

날짜가 접두사로 붙는 새로운 실험 디렉토리를 생성합니다.

try clone https://github.com/tobi/try.git

Git 저장소를 날짜가 접두사로 붙는 실험 디렉토리로 복제합니다.

eval "$(try init ~/src/tries)"

쉘 통합을 위한 초기화 명령어와 경로를 출력합니다.

TRY_PATH 환경변수를 설정하여 기본 저장 경로를 변경할 수 있습니다.

# CDN으로 사용하기

jsDelivr

jsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.

명령어 용어집

이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.

🔍

brew install

설명 보기 ▼

Install a Homebrew formula or cask.

brew install {{formula|cask}}

Install a formula/cask:

brew install {{[-s|--build-from-source]}} {{formula}}

Build and install a formula from source (dependencies will still be installed from bottles):

brew install {{[-n|--dry-run]}} {{formula|cask}}

Download the manifest, print what would be installed but don't actually install anything:

🔍

brew tap

설명 보기 ▼

Tap a Homebrew formula repository. If no arguments are provided, list all installed Homebrew taps.

brew tap

List installed Homebrew taps:

brew tap {{github_username}}/{{github_repository_name}}

Tap a Git repository hosted on GitHub:

brew tap {{username}}/{{repository_name}} {{git_clone_url}}

Tap a Git repository hosted outside of GitHub:

🔍

fzf

설명 보기 ▼

명령줄 퍼지 찾기.
`sk`와 유사.
더 많은 정보: <https://github.com/junegunn/fzf#usage>.

find {{path/to/directory}} -type f | fzf

지정된 디렉터리의 모든 파일에서 `fzf`를 시작:

ps aux | fzf

프로세스 실행을 위해 `fzf`를 시작:

find {{path/to/directory}} -type f | fzf {{[-m|--multi]}} > {{path/to/file}}

`<Shift Tab>`을 사용해 여러 파일을 선택하고 파일에 작성:

🔍

gem

설명 보기 ▼

Ruby 프로그래밍 언어용 패키지 관리자.
더 많은 정보: <https://guides.rubygems.org/command-reference/>.

gem search {{regex}} {{[-a|--all]}}

원격 gem을 검색하고 사용 가능한 모든 버전을 표시:

gem install {{gem_name}}

최신 버전의 gem을 설치:

gem install {{gem_name}} {{[-v|--version]}} {{1.0.0}}

특정 버전의 gem을 설치:

🔍

nix run

설명 보기 ▼

Run an application from a Nix flake.
See also: `nix flake`.

nix run

Run the default application in the flake in the current directory:

nix run nixpkgs#{{pkg}}

Run a command whose name matches the package name from nixpkgs (if you want a different command from that package, see `tldr nix shell`):

nix run nixpkgs#{{vim}} -- {{path/to/file}}

Run a command with provided arguments:

🔍

redis-server

설명 보기 ▼

영구적인 키-값 데이터베이스.
더 많은 정보: <https://redis.io/tutorials/operate/redis-at-scale/talking-to-redis/configuring-a-redis-server/>.

redis-server

기본 포트(6379)를 사용하여 Redis 서버 시작 및 로그를 `stdout`으로 출력:

redis-server --daemonize yes

기본 포트를 사용하여 백그라운드 프로세스로 Redis 서버 시작:

redis-server --port {{port}} --daemonize yes

지정된 포트를 사용하여 백그라운드 프로세스로 Redis 서버 시작:

🔍

ruby

설명 보기 ▼

Ruby 프로그래밍 언어 인터프리터.
관련 항목: `gem`, `bundler`, `rake`, `irb`, `ri`.
더 많은 정보: <https://manned.org/ruby>.

ruby {{path/to/script.rb}}

Ruby 스크립트를 실행:

ruby -e "{{command}}"

명령줄에서 단일 Ruby 명령을 실행:

ruby -c {{path/to/script.rb}}

지정한 Ruby 스크립트의 문법 오류를 확인:

// repository documentation