a-Shell Documentation

repository·master·Indexed 25 days ago

https://github.com/holzschu/a-shell

A Unix-like terminal for iOS and iPadOS supporting multiple windows and various programming languages including Python, Lua, JS, C/C++, and TeX. It features WebAssembly execution for C/C++ programs via clang, integration with Apple Shortcuts for automation, and a bookmarking system for accessing other apps' sandboxes. The terminal includes built-in utilities such as awk, apropos, and amstex, and allows for appearance customization and startup configuration via .profile.

Tokens
103.8K
Snippets
146
Records
706
Agent score
84%

What's inside a-Shell

  1. Information about the NZ English Dictionary (en_NZ)

    master

    The en_NZ dictionary is a New Zealand English dictionary (v0.9 beta) based on the en_GB Myspell dictionary. It has been modified to include:

    • New Zealand places (major cities, towns, and suburbs).
    • New Zealand specific words, organisations, and expressions.

    The dictionary consists of two main files:

    • en_NZ.dic: The dictionary file containing words.
    • en_NZ.aff: The affix file containing rules for word formation.
  2. Manage Vim plugins in a-shell

    master

    The plugin directory is used for standard Vim plugin scripts. Any file within this directory ending in .vim will be automatically sourced by Vim during startup.

    If you need to disable a specific plugin, check the contents of the .vim file for instructions on how to disable it without deleting the file.

  3. Customize shell startup with .profile

    master
    When a new window is opened, a-Shell automatically executes a .profile file if it exists in the home directory. Use this file to set custom environment variables or perform cleanup tasks.
  4. Maintain a language spell file

    master

    To maintain and update spell files for a specific language, follow this workflow to ensure changes are captured in patches:

    1. Setup: Obtain the .aff and .dic files. Unpack them and create backups by copying them to .orig.aff and .orig.dic (do not rename the originals).
    2. Tweak: Modify the .aff and .dic files to improve the .spl file (e.g., removing single-letter words or duplicates using fixdup.vim).
    3. Phonetics: Add relevant SAL lines from the Aspell phonetic dictionary to the .aff file to improve suggestions.
    4. Patching: Create a diff file. If using the Aap tool, use aap diff. Ensure the build is reproducible.
    5. Updating: When new LibreOffice files are released, use aap check to identify changes. Compare .new.dic/.new.aff against .orig.dic/.orig.aff, adjust your files, and then replace the .orig files with the new versions.
  5. Create a Vim color scheme file

    master

    Color scheme files are used with the :colorscheme command or via the GUI 'Edit/Color Scheme' menu. There are two primary methods for defining them:

    Method 1: Define a new Normal color

    Set the background option first, then define the Normal highlight group.

    set background=dark
    highlight clear
    highlight Normal ...

    Method 2: Adjust based on background

    Use the default Normal color and conditionally adjust other groups based on the background setting.

    highlight clear Normal
    set background&
    highlight clear
    if &background == "light"
      highlight Error ...
    else
      highlight Error ...
    endif

    Tips:

    • Use :highlight clear to reset to defaults before applying changes. Ensure set background is called before this command.
    • To remove attributes like bold, use gui=NONE.
    set background=dark
    highlight clear
    highlight Normal ...
  6. Get started with Vim

    master

    For new users, the following resources are recommended:

    • Vim Tutor: A 30-minute interactive course for learning basic commands. Access it via :help tutor or :vimtutor.
    • User Manual: A comprehensive guide to accomplishing editing tasks. The table of contents is available at :help usr_toc.txt.
  7. Navigate Vim help files

    master

    You can navigate through Vim's documentation using several methods:

    • Jump to a subject: Position the cursor on a tag (text enclosed in | characters, e.g., |bars|) and press CTRL-]. If the word is not in bars, Vim will attempt to find help for it automatically.
    • Jump back: Press CTRL-O to return to your previous location. You can repeat this to go further back in your jump history.
    • Mouse navigation: If mouse support is enabled, you can double-click a tag to jump to it.
    • Search for help: Use :help word to find specific topics. To see all matching entries for a word, press CTRL-D after the command, or use :helpgrep word to search through all help files.
  8. Test Vim compatibility with specialized macros

    master

    Vim includes several macro sets designed to demonstrate its capabilities and test vi compatibility. You can use these macros to run complex simulations or solve algorithmic problems within Vim.

    Available macro directories:

    • hanoi: Solves the Tower of Hanoi problem.
    • life: Runs Conway's Game of Life (useful for performance comparisons).
    • maze: Solves a maze.
    • urm: Simulates a Universal Register Machine.
  9. Configure locales on Ubuntu for spell generation

    master

    Vim requires specific locales to be installed to correctly identify letters and case differences during spell file generation. If a locale is missing on Ubuntu, follow these steps:

    1. Edit the supported locales file: sudo vim /var/lib/locales/supported.d/local
    2. Add the required lines from /usr/share/i18n/SUPPORTED.
    3. Reconfigure locales: sudo dpkg-reconfigure locales

    Note: If you use the check_locales.vim script, you must restart Vim to pick up the newly installed locales.

    sudo vim /var/lib/locales/supported.d/local
    sudo dpkg-reconfigure locales