- Shell 57.2%
- Rust 38.5%
- Python 3%
- HTML 0.3%
- JavaScript 0.3%
- Other 0.4%
|
|
||
|---|---|---|
| .cargo | ||
| benchmarks | ||
| build_tools | ||
| cmake | ||
| contrib/debian | ||
| crates | ||
| doc_internal | ||
| doc_src | ||
| docker | ||
| etc | ||
| localization/po | ||
| osx | ||
| share | ||
| src | ||
| tests | ||
| updatecli.d | ||
| vagrants/bsds | ||
| .clang-format | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .rustfmt.toml | ||
| .woodpecker.yml | ||
| BSDmakefile | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.rst | ||
| CMakeLists.txt | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.rst | ||
| COPYING | ||
| deny.toml | ||
| fish.pc.in | ||
| fish.png | ||
| fish.spec.in | ||
| GNUmakefile | ||
| pyproject.toml | ||
| README.rst | ||
| SECURITY.md | ||
| uv.lock | ||
shork
- finally, a command line shell for lesbians 
shork is a smart and user-friendly command line shell for Linux. shork includes features like syntax highlighting, autosuggest-as-you-type, and fancy tab completions that just work, with no configuration required.
Quick Start
shork generally works like other shells, like bash or zsh. A few important differences can be found at https://sugar700.codeberg.page/shork/tutorial.html by searching for the magic phrase “unlike other shells”.
Detailed user documentation is available by running help
within shork, and also at https://sugar700.codeberg.page/shork/
Getting shork
See the Building section for instructions.
Running shork
Once installed, run shork from your current shell to try
shork out!
Dependencies
Running shork requires:
- some common *nix system utilities (currently
mktemp), in addition to the basic POSIX utilities (cat,cut,dirname,ls,mkdir,mkfifo,rm,sh,sort,tee,tr,unameandsedat least, but the full coreutils plusfindandawkis preferred)
The following optional features also have specific requirements:
- builtin commands that have the
--helpoption or print usage messages requiremanfor display - automated completion generation from manual pages requires Python 3.5+
- the
fish_configweb configuration tool requires Python 3.5+ and a web browser - the
alt-o <shared-binds-alt-o>binding requires thefileprogram. - system clipboard integration (with the default Ctrl-V and Ctrl-X
bindings) require either the
xsel,xclip,wl-copy/wl-pasteorpbcopy/pbpasteutilities - full completions for
yarnandnpmrequire theall-the-package-namesNPM module colorlsis used, if installed, to add color when runninglson platforms that do not have color support (such as OpenBSD)
Building
Dependencies
Compiling shork requires:
- Rust (version 1.85 or later), including cargo
- CMake (version 3.15 or later)
- a C compiler (for system feature detection and the test helper binary)
- PCRE2 (headers and libraries) - optional, this will be downloaded if missing
- gettext (only the msgfmt tool) - optional, for translation support
- an Internet connection, as other dependencies will be downloaded automatically
Sphinx is also optionally required to build the documentation from a cloned git repository.
Additionally, running the full test suite requires diff, git, Python 3.5+, pexpect, less, tmux and wget.
Building from source with CMake
Using the steps below makes shork difficult to uninstall or upgrade.
To install into /usr/local, run:
mkdir build; cd build
cmake ..
cmake --build .
sudo cmake --install .
The install directory can be changed using the
-DCMAKE_INSTALL_PREFIX parameter for
cmake.
CMake Build options
In addition to the normal CMake build options (like
CMAKE_INSTALL_PREFIX), shork's CMake build has some other
options available to customize it.
- Rust_COMPILER=path - the path to rustc. If not set, cmake will check $PATH and ~/.cargo/bin
- Rust_CARGO=path - the path to cargo. If not set, cmake will check $PATH and ~/.cargo/bin
- Rust_CARGO_TARGET=target - the target to pass to cargo. Set this for cross-compilation.
- WITH_DOCS=ON|OFF - whether to build the documentation. By default, this is ON when Sphinx is installed.
- FISH_INDENT_FOR_BUILDING_DOCS - useful for cross-compilation. Set
this to the path to the
fish_indentexecutable to use for building HTML docs. By default,${CMAKE_BINARY_DIR}/fish_indentwill be used. If that's not runnable on the compile host, you can build a native one withcargo build --bin fish_indentand set this to$PWD/target/debug/fish_indent. - FISH_USE_SYSTEM_PCRE2=ON|OFF - whether to use an installed pcre2. This is normally autodetected.
- WITH_MESSAGE_LOCALIZATION=ON|OFF - whether to include translations.
- extra_functionsdir, extra_completionsdir and extra_confdir - to compile in an additional directory to be searched for functions, completions and configuration snippets
Building shork with Cargo
You can also build shork with Cargo. This example uses uv to install Sphinx (which
is used for man-pages and --help options). You can also
install Sphinx another way and drop the
uv run --no-managed-python prefix.
git clone https://codeberg.org/sugar700/shork
cd shork
# Optional: check out a specific version rather than building the latest
# development version.
git checkout "$(git for-each-ref refs/tags/ | awk '$2 == "tag" { print $3 }' | tail -1)"
uv run --no-managed-python \
cargo install --path .
This will place standalone binaries in ~/.cargo/bin/,
but you can move them wherever you want.
To disable translations, disable the localize-messages
feature by passing
--no-default-features --features=embed-manpages to
cargo.
You can also link this build statically (but not against glibc) and move it to other computers.
Here are the remaining advantages of a full installation, as currently done by CMake:
- Man pages like
shork(1)installed in standard locations, easily accessible from outside shork. - Separate files for builtins (e.g.
$PREFIX/share/shork/man/man1/abbr.1). - A local copy of the HTML documentation, typically accessed via the
helpshork function. In Cargo builds,helpwill redirect to https://sugar700.codeberg.page/shork/ - Ability to use our CMake options extra_functionsdir,
extra_completionsdir and extra_confdir, (also recorded in
$PREFIX/share/pkgconfig/shork.pc) which are used by some package managers to house third-party completions. Regardless of build system, shork uses$XDG_DATA_DIRS/{vendor_completion.d,vendor_conf.d,vendor_functions.d}.
Contributing Changes to the Code
See the Guide for Developers.
Contact Us
Found a bug? Have an awesome idea? Please open an issue.