# move to home directory
cd ~
# move the .zsh_history file into another .zsh_history_bad file
mv .zsh_history .zsh_history_bad
# write all printable strings into a new .zsh_history file
strings .zsh_history_bad > .zsh_history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
* FileName: Microsoft.PowerShell_profile.ps1 / PowerShell configuration file. | |
* Author: 刘 鹏 | |
* Email: littleNewton6@gmail.com | |
* Created Date: 2021, Aug. 21 | |
* Updated Date: 2023, Mar. 15 | |
* Copyright: No copyright. You can use this code for anything with no warranty. | |
#> | |
To configure Zsh for your user’s session, you can use the following files:
$ZDOTDIR/.zshenv
$ZDOTDIR/.zprofile
$ZDOTDIR/.zshrc
$ZDOTDIR/.zlogin
$ZDOTDIR/.zlogout
By default, Zsh will try to find the user’s configuration files in the $HOME
directory. You can change it by setting the environment variable $ZDOTDIR
.
This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get the length of a string | ${#VARNAME} |
Get a single character | ${VARNAME[index]} |
- Disable or uninstall the official
C/C++ plugin
. - Install the
clangd
plugin. - Build the kernel with
clang
:
/path/to/kernel_source$ make CC=clang defconfig
/path/to/kernel_source$ make CC=clang -j16
- Generate the
compile_commands.json
:
/path/to/kernel_source$ python ./scripts/clang-tools/gen_compile_commands.py