In bashwe can use shopt -s expand_aliasesto extend aliases in scripts.
bash
shopt -s expand_aliases
What are the equivalent commands for zsh, cshand tcsh? Do they even exist?
zsh
csh
tcsh
Having focused my efforts on zsh, I did not find such a team. I even tried to find the file with aliases inside the script, but that didn't work.
For zshyou can usesetopt aliases
setopt aliases
#!/usr/bin/zsh alias hoo="echo bar" unsetopt aliases hoo # outputs `./test.zsh:5: command not found: hoo` setopt aliases hoo # outputs `bar`
See more details man zshoptions.
man zshoptions
For cshand it is tcshenough to find files ( source ${HOME}/.cshrcfor example).
source ${HOME}/.cshrc
Source: https://habr.com/ru/post/1537811/More articles:Finding the starting peak for Dijkstra's algorithm? - algorithmWhat is the Java translation process? - javaКак найти лицо, содержащее предопределенную точку, когда у меня есть плоский граф, встроенный в плоскость - c++Windows screen recording detection using .NET. - c #Screen Tracking in a Windows Application - c #No loops generated sound stored in ByteArray and loaded into Sound object? - actionscript-3Incorrect conversion from 'void *' to 'char *' when using mmap () - c ++Lua table access efficiency - performanceHow to check unreadable OCRed text with NLTK - nlpCan I use my own animated gifs as markers in the Google Maps API? - google-mapsAll Articles