I want to set an alias to start nedit together with command line option -noautosave (due to text files up to 500MB). What seemed to be easy:
alias nn="nedit -noautosave $1 &"
just raises some error "Permission denied" of a different file and another error about unexpected EOF while looking for matching "'" and "unexpected end of file".
One solution I found after a Google Search would be to check the quotes, but I can't see any possible errors with them.
I also tried declaring a function:
function nn () { nedit -noautosave $1 &}
which also failed with same errors.
開くファイルの1つが指定されたサイズよりも大きい場合にのみ実行nedit
する-noautosave
場合は、これを試してください(100Mを使用していますが、独自のサイズ制限を設定できます)。
function nn() {
big=0;
let big+=$(find "$@" -size +100M|wc -l)
if [ $big -gt 0 ]; then
nedit -noautosave -- "$@" &
else
nedit -- "$@" &
fi
}
差出人man nedit
:
-- Treats all subsequent arguments as file names,
even if they start with a dash. This is so NEdit
can access files that begin with the dash
character.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加